Summary: | Small JSPs do not set Content-Length (and use chunked encoding) if AccessLogValve is configured | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | Konstantin Kolinko <knst.kolinko> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | regression | ||
Priority: | P2 | ||
Version: | 7.0.6 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
Konstantin Kolinko
2011-01-14 02:16:41 UTC
What exactly is the issue here? That is HTTP spec compliant behaviour. The issue is that Content-Length header is no more sent in the response for JSP pages that produce less than 8k of output. (HTTP/1.0 responses will just omit that header, HTTP/1.1 response will use chunked encoding). I would agree that the response is valid, so we are not violating protocols here. It is just a feature/enhancement that worked before, (and is also working if AccessLogValve is removed). Is it possible to implement #50496 without breaking this one? E.g. call Response.finishResponse() instead of just flushing? Sounds risky, though. *** Bug 50583 has been marked as a duplicate of this bug. *** The access logging has been refactored to change the point when logging is triggered to after the point when the response has been written so a flush (which was what was forcing the use of chunked encoding) is not required to obtain an accurate count of bytes written. The fix is in 7.0.x and will be included in 7.0.7 onwards. |