question mark transformed to %3f on internal redirects with Nginx 1.2.0

Dilyan Palauzov Dilyan.Palauzov at
Tue May 1 14:45:52 UTC 2012


I have a rule
server {
   index index.php /cgi-bin/wa?INDEX;

/cgi-bin/wa is forwarded to a thhpd server:

location /cgi-bin {
   proxy_set_header X-Real-IP $remote_addr;
   proxy_pass_request_headers on;

and it works with Nginx 1.1.15.

After upgrading to Nginx 1.2.0 (configure arguments:  
--pid-path=/var/run/ --conf-path=/etc/nginx/core.conf  
--error-log-path=/var/log/nginx/nginx.log --user=wwwrun  
--group=nogroup --with-ipv6 --without-poll_module  
--without-select_module --with-file-aio --with-http_ssl_module  
--with-http_addition_module --with-http_xslt_module  
--with-http_image_filter_module --with-http_sub_module  
--with-http_dav_module --with-http_flv_module --with-http_mp4_module  
--with-http_gzip_static_module --with-http_random_index_module  
--with-http_degradation_module --with-http_stub_status_module  
--http-log-path=/var/log/nginx --with-pcre --with-pcre-jit  
--prefix=/usr --with-cc-opt='-O3 -march=native -Wl,--hash-style=gnu  
-Wl,-O1 -flto -Wl,-z,relro' --with-ld-opt='-L/usr/lib64 -L/lib64'  
--without-http_ssi_module --without-http_uwsgi_module  
--without-http_scgi_module --without-http_upstream_ip_hash_module  
--without-http_split_clients_module --without-http_empty_gif_module)  
and invoking the site, that redirects internally to /cgi-bin/wa?INDEX,  
I get an error message from thttpd:

404 Not Found
The requested URL '/cgi-bin/wa%3fINDEX' was not found on this server.

But, if I request directly /cgi-bin/wa?INDEX in the browser,  
everything works perfect.

I think there is something in Nginx 1.2.0, that rewrites the question  
mark in %3f for internal redirects, that was not done in 1.0.15 and I  
would like to have the old behaviour back (or hints, how to solve the  
"cgi-bin/wa%3fINDEX not found" problem .)

Kind regards

More information about the nginx mailing list