This is an automated email from the ASF dual-hosted git repository.
remm 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 eb8cfa2 Avoid keep-alive with inconsistent content delimitation
eb8cfa2 is described below
commit eb8cfa2a4f5ebde23d13d131d6e158245aa1ff5d
Author: remm <[email protected]>
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 57fd00a..f43efe1 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -787,6 +787,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 3455703..a09634b 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -147,6 +147,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="Jasper">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]