Created attachment 23024 [details] Patch to cache content-encoding Using mod_cache & mod_disk_cache, a file named foo.html.gz, and AddEncoding gzip .gz The first request for foo.html.gz returns Content-Encoding: gzip, but the second request, from the cache, doesn't provide a Content-Encoding header in the response. Hence the client doesn't expect the content to be compressed. This seems similar to PR39266, and a similar fix works for me. Patch is attached.
Created attachment 23025 [details] Patch for 2.2.x to cache content-encoding The fix for trunk doesn't apply back to 2.2 due to refactoring. Here's a patch for mod_mem_cache and mod_disk_cache to resolve the same problem.
Thanks for the patch. Committed to trunk as r726796.
Submitted for backporting.