Trouble with rewrite module and uri_escape (and patch)

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:

I don’t know this is correct way, but I want to fix this problem.
Review this please.

Regards,


Daisuke Murase (typester)

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

I don’t know this is correct way, but I want to fix this problem.
Review this please.

You are right, thank you.


Igor S.
http://sysoev.ru/en/