]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r476625 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Mon, 7 May 2007 15:32:57 +0000 (15:32 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 7 May 2007 15:32:57 +0000 (15:32 +0000)
* Use the query string stored in r->parsed_uri.query instead of r->args
  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

Submitted by: rpluem
Reviewed by: rpluem, jim, sctemme

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

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

diff --git a/CHANGES b/CHANGES
index ccd78ec07bdc5f2caedeeae1fa07a67a2c5dd326..1742754a8f9706e185364f7afd7be4d7f331e46c 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                         -*- coding: utf-8 -*-
 Changes with Apache 2.2.5
 
+  *) mod_cache: Correctly cache objects whose URL query string has been
+     modified by mod_rewrite. PR 40805. [Ruediger Pluem]
+
   *) HTTP proxy ProxyErrorOverride: Leave 1xx and 3xx responses alone.  Only
      processing of error responses (4xx, 5xx) will be altered.  PR 39245.
      [Jeff Trawick, Bart van der Schans <schans hippo.nl>]
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 707aaf77b088bbc5e01f85ba76f58d00e1eb0515..acdad8e8b616af99cdc1b330446ef0e15f82d8c1 100644 (file)
@@ -433,7 +433,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)
          */