spaces in URI

Matthieu Tourne matthieu.tourne at
Tue Sep 28 19:58:38 MSD 2010


I was in a similar situation trying to reverse proxy to a site that
has single percent signs in the url, which aren't part of a url
I did a quick patch to allow that, maybe this can help you.


On Tue, Sep 28, 2010 at 7:35 AM, cgarver <nginx-forum at> wrote:
> Reposting to fix the grammar errors!
> Hello folks,
> I have tried both nginx 0.8.46 and 0.8.52 to reverse proxy a URI that
> contains a whitespace, but I'm having no luck. Any URI without a space
> loads just fine, but one that contains a white space results in a "Bad
> Request - HTTP Error 400. The request is badly formed."
> I had verified that the patch referenced above was in the source of
> 0.8.46. [The %20 substitution was missing from the proxy module so I
> added it, but adding that substitution didn't help.]
> Are any of you folks able to reverse proxy a white space URI like
> " Images/test-image.jpg" That's
> not a valid URI. I just wanted to give an example that shows the type of
> white space that is in my URI.
> thanks,
> Chris
> Posted at Nginx Forum:,97031,134985#msg-134985
> _______________________________________________
> nginx mailing list
> nginx at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx-0.8.49-uri_percent.patch
Type: application/octet-stream
Size: 1169 bytes
Desc: not available
URL: <>

More information about the nginx mailing list