Trouble with rewrite module and uri_escape (and patch)

Igor Sysoev igor at sysoev.ru
Fri Jul 30 17:26:44 MSD 2010


On Fri, Jul 30, 2010 at 07:01:42PM +0900, Daisuke Murase (typester) wrote:

> Hi,
> 
> I have nginx/0.7.67 and a following rewrite setting:
> 
>     rewrite ^/entry/(.*) /entry?title=$1;
> 
> When request uri contains %3b (escaped ;), it's decoded like following:
> 
>     Request: /entry/abc%3bdef
>     Result: /entry?title=abc;def
> 
> But %26 (escaped &) is not decoded:
> 
>     Request: /entry/abc%26def
>     Result: /entry?title=abc%26def
> 
> At HTTP URI spec,  ; should be treated as query separator equal to & IMHO
> 
> I wrote quick fix for this:
> http://gist.github.com/500097
> 
> I don't know this is correct way, but I want to fix this problem.
> Review this please.

You are right, thank you.


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list