This is an automated email from the ASF dual-hosted git repository.

remm 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 bfac15e  Avoid keep-alive with inconsistent content delimitation
bfac15e is described below

commit bfac15efd1546444d34b746d662cb684a3c1d12f
Author: remm <r...@apache.org>
AuthorDate: Wed Mar 24 17:12:20 2021 +0100

    Avoid keep-alive with inconsistent content delimitation
    
    Align with new Apache Httpd behavior, for consistency.
    Note: this behavior is not a requirement nor a security issue.
---
 java/org/apache/coyote/http11/Http11Processor.java | 1 +
 webapps/docs/changelog.xml                         | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/java/org/apache/coyote/http11/Http11Processor.java 
b/java/org/apache/coyote/http11/Http11Processor.java
index 68beb91..8c3148f 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -1029,6 +1029,7 @@ public class Http11Processor extends AbstractProcessor {
                 // so remove it.
                 headers.removeHeader("content-length");
                 request.setContentLength(-1);
+                keepAlive = false;
             } else {
                 
inputBuffer.addActiveFilter(inputFilters[Constants.IDENTITY_FILTER]);
                 contentDelimitation = true;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 74b3af5..7d1f3d3 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -151,6 +151,10 @@
         an error during an asynchronous read broke all future asynchronous 
reads
         associated with the same request instance. (markt)
       </fix>
+      <fix>
+        Disable keep-alive when inconsistent content delimitation is present in
+        a request. (remm)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Other">

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

Reply via email to