https://bz.apache.org/bugzilla/show_bug.cgi?id=59310
Bug ID: 59310
Summary: Content-Length of HEAD requests incorrectly computed
as 0
Product: Tomcat 7
Version: 7.0.62
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Connectors
Assignee: [email protected]
Reporter: [email protected]
When responding to a HEAD request without streaming the entity and without
setting the Content-Length, the Content-Length is incorrectly computed to be
zero in org.apache.catalina.connector.OutputBuffer.close(). This is incorrect.
The Content-Length header should be unset in this case.
RFC 7230 doesn't require the Content-Length to be set on HEAD requests, but if
it set it must be the size of the corresponding GET. So "Content-Length: 0"
violates the standard.
Computing the real size would be excessively expensive in our use case because
this would require to transfer data from a backend system.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]