NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/50169: bozohttpd redirect behavior



>Number:         50169
>Category:       bin
>Synopsis:       bozohttpd redirect behavior
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 25 14:05:00 +0000 2015
>Originator:     matthew sporleder
>Release:        7
>Organization:
netbsd.org
>Environment:
NetBSD wip.pkgsrc.org 7.0_BETA NetBSD 7.0_BETA (XEN3_DOMU) #3: Thu Jun  4 19:33:17 UTC 2015  root%amdmin.netbsd.de@localhost:/home/netbsd/7/amd64/obj/sys/arch/amd64/compile/XEN3_DOMU amd64
>Description:
.bzredirect could be a little smarter.  It tends to insert // or /./ into the Location: header depending on how you use it.

If my docroot is /var/www/html and I do this:
ln -s /cgi-bin/gitweb.cgi .bzredirect
I get:
Location: example.com/./cgi-bin/gitweb.cgi

if I am in a dir and ln -s /cgi-bin/gitweb.cgi .bzredirect
I will get Location: example.com/dir//cgi-bin/gitweb.cgi

---

When using .bzredirect (as above), a target url beginning with a '/' should result in Location: scheme://Host/target/url

When .bzredirect does *not* begin with a '/' the url should be relative to the containing dir: Location: scheme://Host/containing/dir/target/url

It should never result in // or /./ being in the url
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index