Looks like a possible RFC 2616 MUST violation. The cache ignores no-cache cache-control directive in the request and serves cached entity. Note that Pragma: no-cache is handled correctly (trace attached), which may be related to a committed patch mentioned in bug 18634. See attached trace(s) for details and ways to reproduce the violation mentioned above. Test case IDs in the trace link to human-oriented test case description and RFC quotes, if available.
Created attachment 6082 [details] no-cache test case trace (violation)
Created attachment 6083 [details] pragma test case trace (success)
FYI: This violation seems to be present in httpd-2.0.54
FYI: This violation seems to be present in httpd-2.0.59 HTTP/1.1 200 OK Date: Tue, 05 Sep 2006 13:37:12 GMT Server: Apache/2.0.59 (Unix) Content-Type: text/html;charset=iso-8859-1 Last-Modified: Tue, 05 Sep 2006 13:08:17 GMT Content-Length: 36709 Content-Language: es Expires: Sat, 1 Jan 2000 00:00:00 GMT Pragma: no-cache Age: 1735 Keep-Alive: timeout=30, max=500 Connection: Keep-Alive Longitud: 36,709 (36K) [text/html]
Please note that mod_cache is experimental in 2.0.x. Please check if this bug is still present in 2.2.3 which has many caching fixes.
Not only does Apache 2.0 ignore the no-cache Cache-Control directive in requests, it ignores the presence of the Cache-Control request header altogether. The no-cache directive in requests is not taken into account in mod_cache.c at all. cache_util.c ap_cache_check_freshness() does make a fair attempt at determining freshness of a cached response and take the Cache-Control request header directives into account. However, it seems like the request_rec structured passed to the function does not contain the Cache-Control header. I think I may provide a fix for both issues.
Created attachment 19601 [details] Patch against 2.0.54
I submitted a patch against 2.0.54. I however believe that requests containing an Authorization header should be treated separately from those containing no-cache directives (ref bug 16133), so this patch is not fully satisfactory.
Created attachment 20547 [details] Patch against 2.0.59 This is a new patch against 2.0.59 that also permits end-to-end revalidation of cached responses when the request contains Cache-Control: no-cache. Previous patch did not allow for updating cache contents.
(In reply to comment #5) > Please note that mod_cache is experimental in 2.0.x. Please check if this bug is > still present in 2.2.3 which has many caching fixes. This bug is no longer present in 2.2.4
I guess that since I already established that the bug is no longer present in 2.2.4, it no longer needs to remain in NEEDINFO status...
Marking as resolved worksforme then. As Cache is experimental 2.0.x it is unlikely that it gets backported to 2.0.x.
(In reply to comment #12) > Marking as resolved worksforme then. As Cache is experimental 2.0.x it is > unlikely that it gets backported to 2.0.x. I was just answering your question from #5 which I understood was the reason for the NEEDINFO status. The patch I submitted solves this problem for 2.0.x. For those of us who use mod_cache and cannot for one reason or another (in my case dependencies to 3pp modules) migrate to 2.2.x, it would be nice if it could make it into for example 2.0.62...
*** Bug 16136 has been marked as a duplicate of this bug. ***