]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_cache: Allow caching of requests with query arguments when Cache-Control
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 18 May 2007 06:12:24 +0000 (06:12 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 18 May 2007 06:12:24 +0000 (06:12 +0000)
max-age is explicitly specified.

(Backport of r538807)

Reviewed by: jerenkrantz, fielding, rpluem

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@539280 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index eae49514480e48fe6479d079a300fa365787ef3c..41643a1f86b04df016c0cd3a39afa0b84be60612 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -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]
 
index 9646b964dadf24453666c686ea7ac15d5b662c44..e83eba80f467ce1b744134793395c0d410a37e1c 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) {