This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new c72a877 Improve the handling of requests that use an expectation. c72a877 is described below commit c72a8777876cf454174609641d9f6e0117b45230 Author: Mark Thomas <ma...@apache.org> AuthorDate: Wed Apr 22 22:11:29 2020 +0100 Improve the handling of requests that use an expectation. Do not disable keep-alive where the response has a non-2xx status code but the request body has been fully read. Patch by rjung. --- java/org/apache/coyote/http11/Http11Processor.java | 2 +- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/java/org/apache/coyote/http11/Http11Processor.java b/java/org/apache/coyote/http11/Http11Processor.java index 47953e8..203c16a 100644 --- a/java/org/apache/coyote/http11/Http11Processor.java +++ b/java/org/apache/coyote/http11/Http11Processor.java @@ -755,7 +755,7 @@ public class Http11Processor extends AbstractProcessor { private void checkExpectationAndResponseStatus() { - if (request.hasExpectation() && + if (request.hasExpectation() && !isRequestBodyFullyRead() && (response.getStatus() < 200 || response.getStatus() > 299)) { // Client sent Expect: 100-continue but received a // non-2xx final response. Disable keep-alive (if enabled) diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index e2e46f7..cfb9a92 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -90,6 +90,11 @@ Include the problematic data in the error message when reporting that the provided request line contains an invalid component. (markt) </fix> + <fix> + Improve the handling of requests that use an expectation. Do not disable + keep-alive where the response has a non-2xx status code but the request + body has been fully read. (rjung/markt) + </fix> </changelog> </subsection> <subsection name="Jasper"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org