URL encoding and other hackery

Eden Li eden at mojiti.com
Mon Feb 18 02:47:14 MSK 2008

What escaping issues?  $request_uri will already be uri-encoded, so  
you can use it directly on the file system. You just need to make sure  
whatever's behind nginx making those files have ordered the parameters  

for example, given a request $request_uri = /path/to/some.xml?a=%22&b= 

$document_root$request_uri ==> /path/to/root/path/to/some.xml?a=%22&b= 

this is a valid path in most file systems.

(note, there's no slash between document_root and request_uri)

On Feb 18, 2008, at 2:24 AM, Adam Doppelt wrote:
> I could use this:
> if (-f $document_root/$request_uri)
> But there are escaping issues. Perhaps nginx needs something like  
> this:
> $request_filename_with_args

More information about the nginx mailing list