This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new ed17ce4104 69575: Avoid using compression if a response is already 
compressed
ed17ce4104 is described below

commit ed17ce41044690c7091842d04cf301183c8bf56d
Author: remm <r...@apache.org>
AuthorDate: Tue Feb 18 17:09:38 2025 +0100

    69575: Avoid using compression if a response is already compressed
    
    Adds compress, deflate and zstd.
---
 java/org/apache/coyote/CompressionConfig.java | 3 ++-
 webapps/docs/changelog.xml                    | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/coyote/CompressionConfig.java 
b/java/org/apache/coyote/CompressionConfig.java
index 1819b399c9..c7fe685f29 100644
--- a/java/org/apache/coyote/CompressionConfig.java
+++ b/java/org/apache/coyote/CompressionConfig.java
@@ -235,7 +235,8 @@ public class CompressionConfig {
                 
log.warn(sm.getString("compressionConfig.ContentEncodingParseFail"), e);
                 return false;
             }
-            if (tokens.contains("gzip") || tokens.contains("br")) {
+            if (tokens.contains("gzip") || tokens.contains("compress") || 
tokens.contains("deflate")
+                    || tokens.contains("br") || tokens.contains("zstd")) {
                 return false;
             }
         }
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 0c44ebe719..9a36a8cc2d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -122,6 +122,15 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="Coyote">
+    <changelog>
+      <fix>
+        <bug>69575</bug>: Avoid using compression if a response is already
+        compressed using <code>compress</code>, <code>deflate</code> or
+        <code>zstd</code>. (remm)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Other">
     <changelog>
       <add>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to