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 735b4d5 Fix BZ 64743 - always sending connection:close with
maxSwallowSize=-1
735b4d5 is described below
commit 735b4d5527385db1df87d29a510d3bbc9fa4d0de
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 a169cb4..98b1f23 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 0704c4d..9a4d4a2 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -62,6 +62,12 @@
Correct numerous spellings throughout the code base. Based on a pull
request from John Bampton. (markt)
</fix>
+ <fix>
+ <bug>64743</bug>: Correct a regression introduced in 10.0.0-M7 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="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]