]> granicus.if.org Git - apache/commitdiff
Support Cache-Control: no-cache with a header name, and private with a
authorGraham Leggett <minfrin@apache.org>
Sun, 17 Oct 2010 01:34:04 +0000 (01:34 +0000)
committerGraham Leggett <minfrin@apache.org>
Sun, 17 Oct 2010 01:34:04 +0000 (01:34 +0000)
header name, which causes a cached entry to require revalidation (ie
is always not-fresh), as per RFC2616 14.9.1.

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

modules/cache/cache_util.c

index 56daff298ff9aa77cde00de920345a784f09e12c..beffab7d2ea1fa4d95e94bc010d328f593e1e8d7 100644 (file)
@@ -516,10 +516,13 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
     /* These come from the cached entity. */
     expstr = apr_table_get(h->resp_hdrs, "Expires");
 
-    if (h->cache_obj->info.control.no_cache) {
+    if (h->cache_obj->info.control.no_cache
+            || h->cache_obj->info.control.no_cache_header
+            || h->cache_obj->info.control.private_header) {
         /*
-         * The cached entity contained Cache-Control: no-cache, so treat as
-         * stale causing revalidation
+         * The cached entity contained Cache-Control: no-cache, or a
+         * no-cache with a header present, or a private with a header
+         * present, so treat as stale causing revalidation.
          */
         return 0;
     }