Accept percents in urls

Hi all,

I need to be able to accept single percents ‘%’ in urls, even if
they’re not part of a valid encoded url.
I know it’s probably not ok in the rfc, but some of the websites we
proxy do that, and I have no control over it.
I would like to forward the request as-is, instead of returning a ‘400
Bad Request’.

Here is a patch that does just that (patch -p1 <
nginx-0.8.49-uri_percent.patch to apply it).
It seems to work, but I’m not exactly sure about the consequences.
I’m wondering if that could be dangerous, and also if r->quoted_uri
should be set to 0, if all the percents encountered are not part of a
valid url encoding.

Thank you.