This is an automated email from the ASF dual-hosted git repository.
markt 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 8aadfc5 Fix BZ 64743 - always sending connection:close with
maxSwallowSize=-1
8aadfc5 is described below
commit 8aadfc5bccfc757220e93d034dd87d77da9fb4a4
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 ce346da..13057c4 100644
--- a/java/org/apache/coyote/http11/Http11Processor.java
+++ b/java/org/apache/coyote/http11/Http11Processor.java
@@ -779,7 +779,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 9404a87..32591c0 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -66,6 +66,12 @@
Do not send an HTTP/2 PING frame to measure round-trip time when it is
known that the HTTP/2 connection is not in a good state. (markt)
</fix>
+ <fix>
+ <bug>64743</bug>: Correct a regression introduced in 8.5.57 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]