You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/10/04 15:00:23 UTC

svn commit: r1529150 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/coyote/http11/AbstractHttp11Processor.java webapps/docs/changelog.xml

Author: markt
Date: Fri Oct  4 13:00:23 2013
New Revision: 1529150

URL: http://svn.apache.org/r1529150
Log:
Re-check error state after service method regardless of keep-alive to ensure unused input is not swallowed on error. This allows the socket to be closed as quickly as possible.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1529149

Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1529150&r1=1529149&r2=1529150&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Fri Oct  4 13:00:23 2013
@@ -1044,7 +1044,7 @@ public abstract class AbstractHttp11Proc
                     // set the status to 500 and set the errorException.
                     // If we fail here, then the response is likely already
                     // committed, so we can't try and set headers.
-                    if(keepAlive && !error) { // Avoid checking twice.
+                    if(!error) { // Avoid checking twice.
                         error = response.getErrorException() != null ||
                                 (!isAsync() &&
                                 statusDropsConnection(response.getStatus()));

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1529150&r1=1529149&r2=1529150&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Fri Oct  4 13:00:23 2013
@@ -77,6 +77,12 @@
         closed in the APR/native connector are removed and then closed in a
         thread-safe manner. (markt)
       </fix>
+      <fix>
+        Ensure that unused input is not swallowed when keep-alive is disabled
+        and the connection enters an error state. This allows the connection to
+        be closed immediately rather than having to wait for the client to first
+        send any remaining data that is only going to be ignored. (markt)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Cluster">



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