Author: billbarker
Date: Sun Nov 16 17:37:11 2008
New Revision: 718155
URL: http://svn.apache.org/viewvc?rev=718155&view=rev
Log:
Don't swallow input if we know the connection is going to be closed
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=718155&r1=718154&r2=718155&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
Sun Nov 16 17:37:11 2008
@@ -876,6 +876,11 @@
// Finish the handling of the request
if (!comet) {
+ // If we know we are closing the connection, don't drain input.
+ // This way uploading a 100GB file doesn't tie up the thread
+ // if the servlet has rejected it.
+ if(error)
+ inputBuffer.setSwallowInput(false);
endRequest();
}
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=718155&r1=718154&r2=718155&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
Sun Nov 16 17:37:11 2008
@@ -911,6 +911,11 @@
// Finish the handling of the request
if (!comet) {
+ // If we know we are closing the connection, don't drain input.
+ // This way uploading a 100GB file doesn't tie up the thread
+ // if the servlet has rejected it.
+ if(error)
+ inputBuffer.setSwallowInput(false);
endRequest();
}
Modified:
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=718155&r1=718154&r2=718155&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java Sun
Nov 16 17:37:11 2008
@@ -866,6 +866,11 @@
// Finish the handling of the request
try {
rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
+ // If we know we are closing the connection, don't drain input.
+ // This way uploading a 100GB file doesn't tie up the thread
+ // if the servlet has rejected it.
+ if(error)
+ inputBuffer.setSwallowInput(false);
inputBuffer.endRequest();
} catch (IOException e) {
error = true;
Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?rev=718155&r1=718154&r2=718155&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Sun Nov 16 17:37:11 2008
@@ -193,6 +193,10 @@
<bug>46077</bug>: Expose deferAccept for configuration. Patch provided
by Michael Leinartas. (markt)
</fix>
+ <add>
+ Don't swallow input if we know the connection is going to be closed.
(billbarker)
+ </add>
+
</changelog>
</subsection>
<subsection name="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]