]> granicus.if.org Git - apache/commitdiff
* Use the query string stored in r->parsed_uri.query instead of r->args
authorRuediger Pluem <rpluem@apache.org>
Sat, 18 Nov 2006 22:17:33 +0000 (22:17 +0000)
committerRuediger Pluem <rpluem@apache.org>
Sat, 18 Nov 2006 22:17:33 +0000 (22:17 +0000)
  as r->args could have been changed (e.g. via mod_rewrite) after the quick
  handler hook. This causes resources to be stored under a key, where they
  cannot be fetched again in the quick handler.

PR: 40805

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

CHANGES
modules/cache/cache_storage.c
modules/cache/mod_cache.c

diff --git a/CHANGES b/CHANGES
index aee5c7f6b396ccb4e8944f1e5a716a44928e2a94..eb297692a021f75fee0a3775a219610436e9b282 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: Correctly cache objects whose URL query string has been
+     modified by mod_rewrite. PR 40805. [Ruediger Pluem]
+
   *) mod_proxy: Add a missing assignment in an error checking code path.
      PR 40865. [Andrew Rucker Jones <arjones simultan.dyndns.org>]
 
index 833520599e6de6dc0b11165d81ff529d492c4632..460fa3dfd69bec5bf693088a98d0da4258fa9b9f 100644 (file)
@@ -427,7 +427,7 @@ apr_status_t cache_generate_key_default(request_rec *r, apr_pool_t* p,
 
     /* Key format is a URI */
     *key = apr_pstrcat(p, scheme, "://", hostname, port_str,
-                       r->parsed_uri.path, "?", r->args, NULL);
+                       r->parsed_uri.path, "?", r->parsed_uri.query, NULL);
 
     return APR_SUCCESS;
 }
index 979091580475d5a410c2371a771dbd9e0aeee3d6..c2483a958fb89c313e329845f469449efe309b56 100644 (file)
@@ -446,7 +446,7 @@ 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 (r->args && exps == NULL) {
+    else if (r->parsed_uri.query && exps == NULL) {
         /* if query string present but no expiration time, don't cache it
          * (RFC 2616/13.9)
          */