]> granicus.if.org Git - apache/commitdiff
* modules/cache/cache_util.c (ap_cache_check_freshness): Use r->headers_in not
authorJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 7 Mar 2005 07:18:34 +0000 (07:18 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Mon, 7 Mar 2005 07:18:34 +0000 (07:18 +0000)
  the stored headers for the Cache-Control check.

Pointed out by: Sander Striker

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

CHANGES
modules/cache/cache_util.c

diff --git a/CHANGES b/CHANGES
index 02f3fefd90bb3fa9196dcdd590189301dfe360c6..b7c2d801bc0e06dda650e2cc77a4ca4b41b1ef16 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ Changes with Apache 2.1.4
 
   [Remove entries to the current 2.0 section below, when backported]
 
+  *) mod_cache: Fix error where incoming Cache-Control would be ignored.
+     [Justin Erenkrantz]
+
   *) worker MPM/mod_status: Support per-worker tracking of pid and
      generation in the scoreboard so that mod_status can accurately
      represent workers in processes which are gracefully terminating.
index dc03017efb2153c0d7746a54888eb4642eb43928..7ad187ac948f559bc5f1e14db47355b874c9c3fa 100644 (file)
@@ -165,8 +165,11 @@ CACHE_DECLARE(int) ap_cache_check_freshness(cache_handle_t *h,
      * entity, and it's value is in the past, it has expired.
      * 
      */
+    /* This value comes from the client's initial request. */
+    cc_req = apr_table_get(r->headers_in, "Cache-Control");
+
+    /* These come from the cached entity. */
     cc_cresp = apr_table_get(h->resp_hdrs, "Cache-Control");
-    cc_req = apr_table_get(h->req_hdrs, "Cache-Control");
     expstr = apr_table_get(h->resp_hdrs, "Expires");
 
     if ((agestr = apr_table_get(h->resp_hdrs, "Age"))) {