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 5da6295 Fix BZ 94944 - correct bytesSent when compression is enabled 5da6295 is described below commit 5da629578186c1d233c943c31dab02b293d25350 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 18d18a3..9ef4afa 100644 --- a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java +++ b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java @@ -67,6 +67,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 d675f2c..8eb4895 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -126,6 +126,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