Bug 46401 - Cache not preserving content-encoding
Summary: Cache not preserving content-encoding
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache (show other bugs)
Version: 2.5-HEAD
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk, PatchAvailable
Depends on:
Blocks:
 
Reported: 2008-12-15 11:29 UTC by Dan Poirier
Modified: 2008-12-16 16:15 UTC (History)
0 users



Attachments
Patch to cache content-encoding (526 bytes, patch)
2008-12-15 11:29 UTC, Dan Poirier
Details | Diff
Patch for 2.2.x to cache content-encoding (1.34 KB, patch)
2008-12-15 12:24 UTC, Dan Poirier
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Poirier 2008-12-15 11:29:08 UTC
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.
Comment 1 Dan Poirier 2008-12-15 12:24:42 UTC
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.
Comment 2 Ruediger Pluem 2008-12-15 12:45:41 UTC
Thanks for the patch. Committed to trunk as r726796.
Comment 3 Paul J. Reder 2008-12-16 16:15:24 UTC
Submitted for backporting.