From 3a3becfa679668fe5f74ab084abf2d75a178f045 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 17 Oct 2010 01:34:04 +0000 Subject: [PATCH] Support Cache-Control: no-cache with a header name, and private with a 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 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index 56daff298f..beffab7d2e 100644 --- a/modules/cache/cache_util.c +++ b/modules/cache/cache_util.c @@ -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; } -- 2.50.1