Author: markt Date: Thu Jun 12 17:37:04 2014 New Revision: 1602244 URL: http://svn.apache.org/r1602244 Log: No need for the expectation check in an error state as the connection will be closed any way.
Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1598153 Modified: tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java?rev=1602244&r1=1602243&r2=1602244&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/coyote/http11/AbstractHttp11Processor.java Thu Jun 12 17:37:04 2014 @@ -1117,18 +1117,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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org