Author: markt
Date: Tue Sep 6 16:16:28 2011
New Revision: 1165746
URL: http://svn.apache.org/viewvc?rev=1165746&view=rev
Log:
Connector alignment - final tweaks to the process method
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=1165746&r1=1165745&r2=1165746&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11AprProcessor.java Tue Sep
6 16:16:28 2011
@@ -172,7 +172,7 @@ public class Http11AprProcessor extends
RequestInfo rp = request.getRequestProcessor();
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
- // Setting up the socket
+ // Setting up the I/O
this.socket = socketWrapper;
inputBuffer.init(socketWrapper, endpoint);
outputBuffer.init(socketWrapper, endpoint);
@@ -318,8 +318,7 @@ public class Http11AprProcessor extends
}
request.updateCounters();
- if (!comet && !isAsync()) {
- // Next request
+ if (!isAsync() && !comet || error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
}
@@ -339,7 +338,7 @@ public class Http11AprProcessor extends
if (error || endpoint.isPaused()) {
return SocketState.CLOSED;
- } else if (comet || isAsync()) {
+ } else if (comet || isAsync()) {
return SocketState.LONG;
} else {
if (sendfileInProgress) {
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=1165746&r1=1165745&r2=1165746&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java
(original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11NioProcessor.java Tue Sep
6 16:16:28 2011
@@ -201,7 +201,7 @@ public class Http11NioProcessor extends
RequestInfo rp = request.getRequestProcessor();
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
- // Setting up the socket
+ // Setting up the I/O
this.socket = socketWrapper;
inputBuffer.init(socketWrapper, endpoint);
outputBuffer.init(socketWrapper, endpoint);
@@ -329,7 +329,7 @@ public class Http11NioProcessor extends
rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
if (!isAsync() && !comet) {
- if(error) {
+ if (error) {
// 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.
@@ -347,8 +347,7 @@ public class Http11NioProcessor extends
}
request.updateCounters();
- if (!comet && !isAsync()) {
- // Next request
+ if (!isAsync() && !comet || error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
}
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=1165746&r1=1165745&r2=1165746&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/Http11Processor.java Tue Sep 6
16:16:28 2011
@@ -263,7 +263,7 @@ public class Http11Processor extends Abs
// Finish the handling of the request
rp.setStage(org.apache.coyote.Constants.STAGE_ENDINPUT);
- if(!isAsync() && !comet) {
+ if (!isAsync() && !comet) {
if (error) {
// If we know we are closing the connection, don't drain
// input. This way uploading a 100GB file doesn't tie up
the
@@ -282,8 +282,7 @@ public class Http11Processor extends Abs
}
request.updateCounters();
- // Next request
- if (!isAsync() || error) {
+ if (!isAsync() && !comet || error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]