Author: markt
Date: Fri Feb 18 16:24:36 2011
New Revision: 1072042
URL: http://svn.apache.org/viewvc?rev=1072042&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=50189
Once the application has finished writing to the response, prevent further
reads from the request since this causes various problems in the connectors
which do not expect this.
Modified:
tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java?rev=1072042&r1=1072041&r2=1072042&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/OutputBuffer.java Fri Feb
18 16:24:36 2011
@@ -275,6 +275,13 @@ public class OutputBuffer extends Writer
doFlush(false);
closed = true;
+ // The request should have been completely read by the time the
response
+ // is closed. Further reads of the input a) are pointless and b) really
+ // confuse AJP (bug 50189) so close the input buffer to prevent them.
+ Request req = (Request) coyoteResponse.getRequest().getNote(
+ CoyoteAdapter.ADAPTER_NOTES);
+ req.inputBuffer.close();
+
coyoteResponse.finish();
}
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1072042&r1=1072041&r2=1072042&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Feb 18 16:24:36 2011
@@ -64,6 +64,11 @@
the expected state transitions. (markt)
</add>
<fix>
+ <bug>50189</bug>: Once the application has finished writing to the
+ response, prevent further reads from the request since this causes
+ various problems in the connectors which do not expect this. (markt)
+ </fix>
+ <fix>
<bug>50700</bug>: Ensure that the override attribute of context
parameters is correctly followed. (markt)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]