Opened 3 years ago
Last modified 1 year ago
Content-Length: 0 is sent on HEAD requests when it should be the length of the body that will be sent on a GET request.
Can't reproduce in 1.3.16.
HEAD / HTTP/1.0
HTTP/1.0 200 OK Content-Length: 4357 ...
This occurs when a script responds to a HEAD request by returning no data but not setting a Content-Length header. Lighttpd inserts the Content-Length header based on the data received. In my opinion it would make more sense to omit the Content-Length header in the zero-length case as if the script intended a zero-byte Content-Length it would have specified that in the header.
Only overwrite the Content-Length header for a non-HEAD request or if we have non-zero-length response body
Is there any plan to do anything with this patch? What good is it if people submit patches which are then ignored?
thanks for bringing this topic back to the top. fixed in [1382].