]> granicus.if.org Git - apache/commitdiff
RFC 2616 13.2.1 calls out max-age as being a valid 'explicit expiration time',
authorJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 17 May 2007 05:43:18 +0000 (05:43 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Thu, 17 May 2007 05:43:18 +0000 (05:43 +0000)
so per Sec. 13.9 permit queries with just max-age instead of only Expires.

* modules/cache/mod_cache.c
  (cache_save_filter): Be closer to RFC 2616's intent for query arguments.
* CHANGES: Update.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@538807 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index 36582fc45af01f4bb0636d134237ca76648ea07a..06902faf4677364391fe58a7fe4dd118f29cda8a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 Changes with Apache 2.3.0
   [Remove entries to the current 2.0 and 2.2 section below, when backported]
 
+  *) mod_cache: Allow caching of requests with query arguments when
+     Cache-Control max-age is explicitly specified.  [Justin Erenkrantz]
+
   *) mod_so: Solve dev's confusion by reporting expected/seen module
      magic signatures when failing with a 'garbled' message, and solve
      user's confusion by pointing out 'perhaps compiled for a different
index 455b9594ff27162b9dbf7998c5857f8033550bd1..a2f4f3ef45adb0f9bfa465b68729f56ba2cd5472 100644 (file)
@@ -452,11 +452,12 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
         /* 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) {