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 187c371 Fix BZ 94944 - correct bytesSent when compression is enabled 187c371 is described below commit 187c3713b8b59abf7a4944a57ac55b0bacef2097 Author: Mark Thomas <ma...@apache.org> AuthorDate: Mon Nov 30 13:08:21 2020 +0000 Fix BZ 94944 - correct bytesSent when compression is enabled --- java/org/apache/coyote/http11/filters/GzipOutputFilter.java | 1 + webapps/docs/changelog.xml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java index 2f34d15..e691795 100644 --- a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java +++ b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java @@ -84,6 +84,7 @@ public class GzipOutputFilter implements OutputFilter { int len = chunk.remaining(); if (chunk.hasArray()) { compressionStream.write(chunk.array(), chunk.arrayOffset() + chunk.position(), len); + chunk.position(chunk.position() + len); } else { byte[] bytes = new byte[len]; chunk.put(bytes); diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 0ecf177..5915cea 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -119,6 +119,14 @@ </fix> </changelog> </subsection> + <subsection name="Coyote"> + <changelog> + <fix> + <bug>64944</bug>: Ensure that the bytesSent metric is correctly updated + when compression is enabled. (markt) + </fix> + </changelog> + </subsection> <subsection name="Web applications"> <changelog> <fix> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org