tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject svn commit: r714214 - in /tomcat/trunk/java/org/apache/coyote/http11: Http11AprProcessor.java Http11NioProcessor.java Http11Processor.java
Date Sat, 15 Nov 2008 02:30:13 GMT
Author: billbarker
Date: Fri Nov 14 18:30:12 2008
New Revision: 714214

URL: http://svn.apache.org/viewvc?rev=714214&view=rev
Log:
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.


Modified:
    tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
    tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java

Modified: tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java?rev=714214&r1=714213&r2=714214&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Fri Nov 14 18:30:12
2008
@@ -860,6 +860,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/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java?rev=714214&r1=714213&r2=714214&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Fri Nov 14 18:30:12
2008
@@ -893,6 +893,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/trunk/java/org/apache/coyote/http11/Http11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java?rev=714214&r1=714213&r2=714214&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Fri Nov 14 18:30:12 2008
@@ -850,6 +850,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;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message