Bug 55453 - AJP send Body with Status 304
Summary: AJP send Body with Status 304
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Connectors (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-20 04:48 UTC by Dieter Paradeiser
Modified: 2013-08-28 13:22 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dieter Paradeiser 2013-08-20 04:48:03 UTC
When Status 304 is set to the Response, AJP send the Body to Apache2. In the HTTP-Connector there is a check against 304, see Method "prepareResponse" in Class org.apache.coyote.http11.AbstractHttp11Processor.

304 with Body will corrupt Apache2, see Bug https://issues.apache.org/bugzilla/show_bug.cgi?id=23181
Comment 1 Christopher Schultz 2013-08-20 15:07:45 UTC
So you are saying that AbstractAjpProcessor.prepareResponse needs to have similar logic?

Under what conditions is a 304 response being sent along with a body? Is this a Tomcat problem (i.e. a situation where Tomcat itself generates a 304-response with a body) or is this a situation where a webapp can attempt to return a 304 response with a body and you want Tomcat to prevent it from doing so?

RFC 2616 does use RFC-MUST-NOT language when referring to 304 responses: "the response MUST NOT contain a message-body".
Comment 2 Dieter Paradeiser 2013-08-20 15:27:50 UTC
*) same logic, would be solve the problem ;o)
**) ajp should also remove the body from response when status 304 is set
*) its a webapp, jira from atlassian
*) I know about the rfc, I also requested a bug for jira (atlassian-support)
Comment 3 Mark Thomas 2013-08-28 13:22:39 UTC
Thanks for the report.

This has been fixed in 7.0.x and trunk and will be included in 8.0.0-RC2 and 7.0.43 onwards.