This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 7db1af0 Fix BZ 64743 - always sending connection:close with
maxSwallowSize=-1
7db1af0 is described below
commit 7db1af07627baafd602d2a6dd4e4f4fdefb2273a
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 17 09:39:18 2020 +0100
Fix BZ 64743 - always sending connection:close with maxSwallowSize=-1
https://bz.apache.org/bugzilla/show_bug.cgi?id=64743
---
java/org/apache/coyote/http11/Http11Processor.java | 2 +-
webapps/docs/changelog.xml | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/coyote/http11/Http11Processor.java
b/java/org/apache/coyote/http11/Http11Processor.java
index a64a5fd..1c72c33 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -537,7 +537,7 @@ public class Http11Processor extends AbstractProcessor {
// Ignore, an error here is already processed in prepareRequest
// but is done again since the content length is still -1
}
- if (contentLength > 0 &&
+ if (contentLength > 0 && protocol.getMaxSwallowSize() > -1 &&
(contentLength - request.getBytesRead() >
protocol.getMaxSwallowSize())) {
// There is more data to swallow than Tomcat will accept so the
// connection is going to be closed. Disable keep-alive which will
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index a37753b..4792ad1 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -73,6 +73,12 @@
<fix>
Ensure HTTP/2 timeouts are processed for idle connections. (markt)
</fix>
+ <fix>
+ <bug>64743</bug>: Correct a regression introduced in 9.0.37 that
+ caused a <code>Connection: close</code> header to be added to the
+ response if the Connector was configured with
+ <code>maxSwallowSize=-1</code>. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Web applications">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]