You're right, having a slash there made Apache handle the redirect.
Some further testing showed:
- Apache handles the redirect internally when the value of the Location header begins with a slash
- Apache doesn't handle it internally when it's a relative path
- Apache doesn't handle it internally when it's an absolute URL (m!^http://!)
Update (200112191738+0200)
While watching tv, suddenly it all became clear to me: a webserver simply cannot handle relative paths, because it doesn't handle paths! The webserver can only handle absolute requests, and then only on the current host (Which seems logical if you know what the request line is:
GET /foo.html HTTP/1.1, no hostname in there! (The hostname is in the Host-header, or there isn't a hostname at all)).
Browsers, however, CAN handle relative things, or should at least be able to. That's why Apache lets the browser handle "test.txt", but can handle "/test/test.txt" without asking the browser.
Am I right now, or was this sudden brainstorm wrong too?
2;0 juerd@ouranos:~$ perl -e'undef christmas'
Segmentation fault
2;139 juerd@ouranos:~$