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 2014/05/28 23:46:55 UTC
svn commit: r1598153 -
/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
Author: markt
Date: Wed May 28 21:46:55 2014
New Revision: 1598153
URL: http://svn.apache.org/r1598153
Log:
No need for the expectation check in an error state as the connection will be closed any way.
Modified:
tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
Modified: tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1598153&r1=1598152&r2=1598153&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Wed May 28 21:46:55 2014
@@ -1073,18 +1073,16 @@ public abstract class AbstractHttp11Proc
// input. This way uploading a 100GB file doesn't tie up the
// thread if the servlet has rejected it.
getInputBuffer().setSwallowInput(false);
- }
- if (response.getStatus() < 200 || response.getStatus() > 299) {
- if (expectation) {
- // Client sent Expect: 100-continue but received a
- // non-2xx response. Disable keep-alive (if enabled) to
- // ensure the connection is closed. Some clients may
- // still send the body, some may send the next request.
- // No way to differentiate, so close the connection to
- // force the client to send the next request.
- getInputBuffer().setSwallowInput(false);
- keepAlive = false;
- }
+ } else if (expectation &&
+ (response.getStatus() < 200 || response.getStatus() > 299)) {
+ // Client sent Expect: 100-continue but received a
+ // non-2xx response. Disable keep-alive (if enabled) to
+ // ensure the connection is closed. Some clients may
+ // still send the body, some may send the next request.
+ // No way to differentiate, so close the connection to
+ // force the client to send the next request.
+ getInputBuffer().setSwallowInput(false);
+ keepAlive = false;
}
endRequest();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org