You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by je...@apache.org on 2007/05/18 08:12:25 UTC
svn commit: r539280 - in /httpd/httpd/branches/2.2.x: CHANGES
modules/cache/mod_cache.c
Author: jerenkrantz
Date: Thu May 17 23:12:24 2007
New Revision: 539280
URL: http://svn.apache.org/viewvc?view=rev&rev=539280
Log:
mod_cache: Allow caching of requests with query arguments when Cache-Control
max-age is explicitly specified.
(Backport of r538807)
Reviewed by: jerenkrantz, fielding, rpluem
Modified:
httpd/httpd/branches/2.2.x/CHANGES
httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c
Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?view=diff&rev=539280&r1=539279&r2=539280
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Thu May 17 23:12:24 2007
@@ -1,6 +1,9 @@
-*- coding: utf-8 -*-
Changes with Apache 2.2.5
+ *) mod_cache: Allow caching of requests with query arguments when
+ Cache-Control max-age is explicitly specified. [Justin Erenkrantz]
+
*) mod_disk_cache: Allow Vary'd responses to be refreshed properly.
[Justin Erenkrantz]
Modified: httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c?view=diff&rev=539280&r1=539279&r2=539280
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c (original)
+++ httpd/httpd/branches/2.2.x/modules/cache/mod_cache.c Thu May 17 23:12:24 2007
@@ -452,11 +452,12 @@
/* if a Expires header is in the past, don't cache it */
reason = "Expires header already expired, not cacheable";
}
- else if (!conf->ignorequerystring && r->parsed_uri.query && exps == NULL) {
- /* if query string present but no expiration time, don't cache it
- * (RFC 2616/13.9)
+ else if (!conf->ignorequerystring && r->parsed_uri.query && exps == NULL &&
+ !ap_cache_liststr(NULL, cc_out, "max-age", NULL)) {
+ /* if a query string is present but no explicit expiration time,
+ * don't cache it (RFC 2616/13.9 & 13.2.1)
*/
- reason = "Query string present but no expires header";
+ reason = "Query string present but no explicit expiration time";
}
else if (r->status == HTTP_NOT_MODIFIED &&
!cache->handle && !cache->stale_handle) {