(tomcat) branch 11.0.x updated: Review c71512e2 - need to flip buffer before write

[email protected] Mon, 03 Aug 2026 08:03:48 +0000
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <178574422890.1084739.18050806221416253431@gitbox3-he-fi.apache.org>
This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 7af5d3c9f0 Review c71512e2 - need to flip buffer before write
7af5d3c9f0 is described below

commit 7af5d3c9f0dd3cfc6ac74fd7661364663544a77a
Author: Mark Thomas <[email protected]>
AuthorDate: Mon Aug 3 09:02:58 2026 +0100

    Review c71512e2 - need to flip buffer before write
---
 java/org/apache/coyote/http11/filters/GzipOutputFilter.java | 1 +
 1 file changed, 1 insertion(+)

diff --git a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
index 24132e05c0..8351a71647 100644
--- a/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
+++ b/java/org/apache/coyote/http11/filters/GzipOutputFilter.java
@@ -169,6 +169,7 @@ public class GzipOutputFilter implements OutputFilter {
             // compatibility with Sun JDK 1.4.0
             outputChunk.clear();
             outputChunk.put((byte) (b & 0xff));
+            outputChunk.flip();
             buffer.doWrite(outputChunk);
         }