httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1023399 - /httpd/httpd/trunk/modules/cache/cache_util.c
Date Sun, 17 Oct 2010 01:34:04 GMT
Author: minfrin
Date: Sun Oct 17 01:34:04 2010
New Revision: 1023399

URL: http://svn.apache.org/viewvc?rev=1023399&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/modules/cache/cache_util.c

Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=1023399&r1=1023398&r2=1023399&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Sun Oct 17 01:34:04 2010
@@ -516,10 +516,13 @@ int cache_check_freshness(cache_handle_t
     /* 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;
     }



Mime
View raw message