https://issues.apache.org/bugzilla/show_bug.cgi?id=55547
Bug ID: 55547
Summary: mod_cache strips the non-cacheable headers from an
original 304 response (valid stale entry)
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: mod_cache
Assignee: [email protected]
Reporter: [email protected]
Created attachment 30817
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30817&action=edit
Don't strip the non-cacheable headers from a validated 304 response
When mod_cache asks for a revalidation of a stale entry and the origin responds
with a 304 (not that stale), the module strips the non-cacheable headers from
the origin response and merges the stale headers to update the cache (before
store_headers).
The problem is that mod_cache won't forward the non-cacheable headers to the
client, for example if the 304 response contains both Set-Cookie and
'Cache-Control: no-cache="Set-Cookie"' headers.
The issue was already stated in bug 54706, comment 3, although not related to
the changes made there (before the Cache-Control no-cache=/no-store= handling,
the bug could arise using the CacheIgnoreHeaders directive, and still can),
hence the comment was not taken into account.
I also proposed to compute the cacheable headers once in bug 54706, comment 9,
and fix this issue together by maintaining the cacheable/response headers
separatly, but this is surely an overkill patch (reintroducing the
request_config in mod_cache to preserve the API) for the only purpose of this
issue.
Finally a simple patch can do the job, and is attached here.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]