Re: [tomcat] branch master updated: Improve the handling of requests that use an expectation.

2020-04-23 Thread Rainer Jung

Thanks for that.

Rainer

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[tomcat] branch master updated: Improve the handling of requests that use an expectation.

2020-04-22 Thread markt
This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
 new bb2369b  Improve the handling of requests that use an expectation.
bb2369b is described below

commit bb2369bec5ab80079af1223187861d796e57f431
Author: Mark Thomas 
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 a9e56b2..4b6afdb 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -513,7 +513,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 b5c0af0..94faf81 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -103,6 +103,11 @@
 Include the problematic data in the error message when reporting that
 the provided request line contains an invalid component. (markt)
   
+  
+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)
+  
 
   
   


-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org