If I send the following to lighttpd as a FastCGI response:
{{{"Status: 302\r\nContent-Type: text/html;
charset=Shift_JIS\r\nContent-Length: 104\r\nContent-Language: ja\r\nExpires:
Mon, 15 Oct 2007 10:42:32 GMT\r\nlocation:
http://localhost:8080/ja/page/gallery/image/5/image.jpg/240\r\n\r\n<html>\n
<head><title>Redirect</title></head>\n <body>Click <a
href=\"....\">here</a>.</body>\n</html>\n"}}}
lightpd generates pretty much what one would expect as a response:
HTTP/1.1 302 Found
Content-Type: text/html; charset=Shift_JIS
Content-Length: 104
Content-Language: ja
Expires: Mon, 15 Oct 2007 11:06:41 GMT
location: http://localhost:8080/ja/page/gallery/image/5/image.jpg/240
Date: Mon, 15 Oct 2007 11:06:41 GMT
Server: lighttpd/1.4.18
<html> <head><title>Redirect</title></head> <body>Click <a
href="....">here</a>.</body></html>
If instead I send back this:
{{{"Status: 307\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Length:
104\r\nExpires: Mon, 15 Oct 2007 10:42:08 GMT\r\nlocation:
http://localhost:8080/ja/page/gallery/image/5/image.jpg/240\r\n\r\n<html>\n
<head><title>Redirect</title></head>\n <body>Click <a
href=\"....\">here</a>.</body>\n</html>\n"}}}
lighttpd or mod_fastcgi (I don't know which) strips off the body, but leaves
the content length the same:
HTTP/1.1 307 Temporary Redirect
Content-Type: text/html; charset=UTF-8
Content-Length: 104
Expires: Mon, 15 Oct 2007 11:07:23 GMT
location: http://localhost:8080/ja/page/gallery/image/5/image.jpg/240
Date: Mon, 15 Oct 2007 11:07:23 GMT
Server: lighttpd/1.4.18
This is illegal, and also annoying, as it stalls the keep-alive connection,
pausing the browser for five seconds or more every time it happens.