MEDIUM: cache/compression: Add a way to safely combined compression and cache
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 11 Dec 2018 07:57:45 +0000 (08:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 11 Dec 2018 16:09:31 +0000 (17:09 +0100)
commitafd819c54a1151f748143ec9db6817d61072bdf5
tree8c21cfaaaccb128e81c008126aa4c59807826fb3
parentf4a4ef7d7cee4913d88be247595177251addc6d3
MEDIUM: cache/compression: Add a way to safely combined compression and cache

This is only true for HTX proxies. On legacy HTTP proxy, if the compression and
the cache are both enabled, an error during HAProxy startup is triggered.

With the HTX, now you can use both in any order. If the compression is defined
before the cache, then the responses will be stored compressed. If the
compression is defined after the cache, then the responses will be stored
uncompressed. So in the last case, when a response is served from the cache, it
will compressed too like any response.
src/cache.c