From: Justin Erenkrantz Date: Mon, 7 Mar 2005 07:18:34 +0000 (+0000) Subject: * modules/cache/cache_util.c (ap_cache_check_freshness): Use r->headers_in not X-Git-Tag: 2.1.4~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a32a693014ba5ed7e327d83c7f14efbf2a4b889d;p=apache * modules/cache/cache_util.c (ap_cache_check_freshness): Use r->headers_in not 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 --- diff --git a/CHANGES b/CHANGES index 02f3fefd90..b7c2d801bc 100644 --- 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. diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index dc03017efb..7ad187ac94 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -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"))) {