Opened 9 years ago

Closed 9 years ago

#35 closed defect (invalid)

nginx not strip #fragment for proxy_pass

Reported by: www.google.com/accounts/o8/id?id=AItOawmYZK7J28w51er0q1ieReZLTslLppi6eCs Owned by: somebody
Priority: minor Milestone:
Component: nginx-module Version: 1.0.x
Keywords: proxy fragment Cc:
uname -a: Linux vz101 2.6.32-042stab039.2 #1 SMP Fri Oct 7 13:21:15 MSD 2011 x86_64 GNU/Linux
nginx -V: nginx: nginx version: nginx/1.0.8
nginx: TLS SNI support enabled
nginx: configure arguments: --prefix=/etc/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/var/run/nginx.pid --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.0.8/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.0.8/debian/modules/nginx-upstream-fair

Description

I known web browser dose not submit fragment string to server.

But some robot dose not strip the #fragment in URL, and send it to server, it will cause a http 404.

May be it's not a bug, it's robot bug. But in future, fragment will be more use.

Example:

# in xxx.conf
location / {
    proxy_pass http://backend;
    # ...
}
# test
curl http://example.org/something#fragment
# solution
rewrite (.+) $1;
location / {
    proxy_pass http://backend;
    # ...
}

Change History (1)

comment:1 by Maxim Dounin, 9 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.