From: markt Date: Wed, 18 May 2011 17:16:26 +0000 (+0000) Subject: If an error status is set during async processing, don't drop the connection and... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=49c8547b7266051295c906266d0037be5f1b531a;p=tomcat7.0 If an error status is set during async processing, don't drop the connection and let the async processing handle it git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1124340 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11AprProcessor.java b/java/org/apache/coyote/http11/Http11AprProcessor.java index 98d15d0e5..a6cb61505 100644 --- a/java/org/apache/coyote/http11/Http11AprProcessor.java +++ b/java/org/apache/coyote/http11/Http11AprProcessor.java @@ -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; diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index e774b7f1d..609d33722 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -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()); diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 337466a1b..5e5cc2d99 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -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) {