Commit d6a9b9e0 authored by Justin Erenkrantz's avatar Justin Erenkrantz
Browse files

* 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
parent ae1bc2e5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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.
+4 −1
Original line number Diff line number Diff line
@@ -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"))) {