Trouble with rewrite module and uri_escape (and patch)

Daisuke Murase (typester) typester at gmail.com
Fri Jul 30 14:01:42 MSD 2010


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.

Regards,

-- 
Daisuke Murase (typester)



More information about the nginx mailing list