If an error status is set during async processing, don't drop the connection and...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 18 May 2011 17:16:26 +0000 (17:16 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 18 May 2011 17:16:26 +0000 (17:16 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1124340 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11AprProcessor.java
java/org/apache/coyote/http11/Http11NioProcessor.java
java/org/apache/coyote/http11/Http11Processor.java

index 98d15d0..a6cb615 100644 (file)
@@ -311,7 +311,8 @@ public class Http11AprProcessor extends AbstractHttp11Processor {
                     // committed, so we can't try and set headers.
                     if(keepAlive && !error) { // Avoid checking twice.
                         error = response.getErrorException() != null ||
-                                statusDropsConnection(response.getStatus());
+                                (!isAsync() &&
+                                statusDropsConnection(response.getStatus()));
                     }
                 } catch (InterruptedIOException e) {
                     error = true;
index e774b7f..609d337 100644 (file)
@@ -401,7 +401,8 @@ public class Http11NioProcessor extends AbstractHttp11Processor {
                     // committed, so we can't try and set headers.
                     if(keepAlive && !error) { // Avoid checking twice.
                         error = response.getErrorException() != null ||
-                                statusDropsConnection(response.getStatus());
+                                (!isAsync() &&
+                                statusDropsConnection(response.getStatus()));
                     }
                     // Comet support
                     SelectionKey key = socket.getIOChannel().keyFor(socket.getPoller().getSelector());
index 337466a..5e5cc2d 100644 (file)
@@ -322,7 +322,8 @@ public class Http11Processor extends AbstractHttp11Processor {
                     // committed, so we can't try and set headers.
                     if(keepAlive && !error) { // Avoid checking twice.
                         error = response.getErrorException() != null ||
-                                statusDropsConnection(response.getStatus());
+                                (!isAsync() &&
+                                statusDropsConnection(response.getStatus()));
                     }
 
                 } catch (InterruptedIOException e) {