httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject svn commit: r1023389 - /httpd/httpd/trunk/modules/cache/mod_cache.c
Date Sat, 16 Oct 2010 23:32:45 GMT
Author: minfrin
Date: Sat Oct 16 23:32:45 2010
New Revision: 1023389

URL: http://svn.apache.org/viewvc?rev=1023389&view=rev
Log:
Add support for proxy-revalidate as per RFC2616 section 14.9.4.

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

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1023389&r1=1023388&r2=1023389&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Sat Oct 16 23:32:45 2010
@@ -797,7 +797,8 @@ static int cache_save_filter(ap_filter_t
         ap_remove_output_filter(cache->remove_url_filter);
 
         if (cache->stale_handle
-                && !cache->stale_handle->cache_obj->info.control.must_revalidate)
{
+                && !cache->stale_handle->cache_obj->info.control.must_revalidate
+                && !cache->stale_handle->cache_obj->info.control.proxy_revalidate)
{
             const char *warn_head;
 
             /* morph the current save filter into the out filter, and serve from
@@ -976,7 +977,8 @@ static int cache_save_filter(ap_filter_t
         reason = "Cache-Control: private present";
     }
     else if (apr_table_get(r->headers_in, "Authorization")
-            && !(control.s_maxage || control.must_revalidate || control.public))
{
+            && !(control.s_maxage || control.must_revalidate
+                    || control.proxy_revalidate || control.public)) {
         /* RFC2616 14.8 Authorisation:
          * if authorisation is included in the request, we don't cache,
          * but we can cache if the following exceptions are true:
@@ -1601,7 +1603,8 @@ static void cache_insert_error_filter(re
         cache_request_rec *cache = (cache_request_rec *) dummy;
 
         if (cache->stale_handle && cache->save_filter
-                && !cache->stale_handle->cache_obj->info.control.must_revalidate)
{
+                && !cache->stale_handle->cache_obj->info.control.must_revalidate
+                && !cache->stale_handle->cache_obj->info.control.proxy_revalidate)
{
             const char *warn_head;
             cache_server_conf
                     *conf =



Mime
View raw message