18 messages in ru.sysoev.nginxRe: Possible rewrite regular expressi...
FromSent OnAttachments
Peter HoangJun 23, 2008 2:33 am 
RoxisJun 23, 2008 2:44 am 
Peter HoangJun 23, 2008 6:01 am 
Peter HoangJun 23, 2008 7:43 am 
Igor SysoevJun 23, 2008 7:55 am 
RoxisJun 23, 2008 7:56 am 
Peter HoangJun 23, 2008 8:01 am 
Peter HoangJun 24, 2008 8:47 am 
Igor SysoevJun 24, 2008 8:54 am 
Peter HoangJun 24, 2008 9:03 am 
Peter HoangJun 24, 2008 9:43 am 
Igor SysoevJun 24, 2008 11:01 am 
Igor SysoevJun 24, 2008 11:02 am 
Peter HoangJun 24, 2008 6:09 pm 
Peter HoangJun 24, 2008 10:01 pm 
Peter HoangJun 25, 2008 1:12 am 
Peter HoangJun 25, 2008 11:56 am 
Michal MachJul 23, 2009 4:13 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Possible rewrite regular expression bug?Actions...
From:Peter Hoang (list@public.gmane.org)
Date:Jun 24, 2008 10:01:14 pm
List:ru.sysoev.nginx

I'm looking at the log file and there is difference between how NGINX and Apache handle $args.

Apache:

(4) RewriteCond: input='GET /search/q-C%2B%2B.html HTTP/1.1' pattern='^[A-Z]{3,9}\ /search/([^\-]+)-([^/]*).html\ HTTP/' => matched (2) rewrite '/search/q-C++.html' -> '/search?q=C%2B%2B' (3) split uri=/search?q=C%2B%2B -> uri=/search, args=q=C%2B%2B (2) forcing '/search' to get passed through to next API URI-to-filename handler

NGINX:

"^/search/([^\-]+)-([^/]*).html" matches "/search/q-C%2B%2B.html", client: 127.0.0.1, server: localhost, request: "GET /search/q-C%2B%2B.html HTTP/1.1", host: "localhost:82" "^/search/([^\-]+)-(.*).html$" matches "/search/q-C++.html", client: 127.0.0.1, server: localhost, request: "GET /search/q-C%2B%2B.html HTTP/1.1", host: rewritten data: "/search", args: "q=C++", client: 127.0.0.1, server: localhost, request: "GET /search/q-C%2B%2B.html HTTP/1.1", host: "localhost:82"

As can be seen, Apache doesn't decode $args while NGINX does. Is it possible to orverwrite this behaviour? How much code needed to be changed? I wouldn't mind hacking the source if it's a simple change.

Thanks.