mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-24 23:31:40 +02:00
Caching the response with the compression enabled was totally broken. To fix the problem, the compression must be done after caching the response. Otherwise it needs to change the cache to store compressed and uncompressed objects for the same ressource. So, because it is not possible for now, it is forbidden to declare the compression filter before the cache one. To ease the configuration, both can be implicitly declared (without "filter" keyword). The compression will automatically be inserted after the cache. Then, to make it works this way, the compression filter has been slighly modified. Now, the response headers are updated after http-response rules evaluations, instead of before. So, if the response contains a "Content-length" header, it will be kept with the response stored in the cache. So this cached response will be able to be served to clients not supporting the compression at all.