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);
}
request.updateCounters();
- if (!comet && !isAsync()) {
- // Next request
+ if (!isAsync() && !comet || error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
}
if (error || endpoint.isPaused()) {
return SocketState.CLOSED;
- } else if (comet || isAsync()) {
+ } else if (comet || isAsync()) {
return SocketState.LONG;
} else {
if (sendfileInProgress) {
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);
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.
}
request.updateCounters();
- if (!comet && !isAsync()) {
- // Next request
+ if (!isAsync() && !comet || error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
}
// 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
}
request.updateCounters();
- // Next request
- if (!isAsync() || error) {
+ if (!isAsync() && !comet || error) {
inputBuffer.nextRequest();
outputBuffer.nextRequest();
}