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
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".
*) 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)
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.