From: Graham Leggett Date: Sun, 17 Oct 2010 01:34:04 +0000 (+0000) Subject: Support Cache-Control: no-cache with a header name, and private with a X-Git-Tag: 2.3.9~297 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3a3becfa679668fe5f74ab084abf2d75a178f045;p=thirdparty%2Fapache%2Fhttpd.git 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 --- diff --git a/modules/cache/cache_util.c b/modules/cache/cache_util.c index 56daff298ff..beffab7d2ea 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; }