mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 20:30:23 +00:00
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.
This commit is contained in:
parent
67df6fedae
commit
5b2f600036
4 changed files with 31 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue