Summary: | HTTP 304 NOT MODIFIED should not set Content-Length | ||
---|---|---|---|
Product: | Tomcat 9 | Reporter: | Boris Petrov <boris_petrov> |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 9.0.24 | ||
Target Milestone: | ----- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Boris Petrov
2019-08-30 12:15:22 UTC
The default servlet does not do this. Tomcat does not do this if a Servlet returns a 304 response. An application may well do this but that would be an application issue. Is it possible that the default Tomcat configuration adds this header? When I run our integration tests (which use the embedded Tomcat), this header is not present in these responses. However, in production the header is there. How do I debug who adds it? That is a question for the users mailing list. As noted in a mailing list message: https://mail-archives.apache.org/mod_mbox/tomcat-users/201909.mbox/%3C0be01580-54c6-c5c4-16b7-000a577c4ebb%40profuzdigital.com%3E This happens only on HTTP/2 and is indeed a Tomcat bug. Fixed in: - master for 9.0.25 onwards - 8.5.x for 8.5.46 onwards |