From 5b2f600036145653c48a7e8a60853e4a0ecc770b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Fri, 5 Jan 2024 15:53:42 +0100
Subject: Don't automatically compress when response has etag

In the cowboy_compress_h stream handler.

Otherwise this could cause issues with caching, with the
etag being the same for compressed/uncompressed content.

Users that wish to send etags AND compress will have to
do it manually for the time being.
---
 doc/src/manual/cowboy_compress_h.asciidoc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'doc/src/manual/cowboy_compress_h.asciidoc')

diff --git a/doc/src/manual/cowboy_compress_h.asciidoc b/doc/src/manual/cowboy_compress_h.asciidoc
index f6a45a9..048a4ac 100644
--- a/doc/src/manual/cowboy_compress_h.asciidoc
+++ b/doc/src/manual/cowboy_compress_h.asciidoc
@@ -9,7 +9,7 @@ cowboy_compress_h - Compress stream handler
 The module `cowboy_compress_h` compresses response bodies
 automatically when the client supports it. It will not
 try to compress responses that already have a content
-encoding.
+encoding or that have an etag header defined.
 
 Normal responses will only be compressed when their
 size is lower than the configured threshold. Streamed
@@ -55,6 +55,8 @@ The compress stream handler does not produce any event.
 
 == Changelog
 
+* *2.11*: Compression is now disabled when the etag
+  header is in the response headers.
 * *2.6*: The options `compress_buffering` and
   `compress_threshold` were added.
 * *2.0*: Module introduced.
-- 
cgit v1.2.3

