]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add support for proxy-revalidate as per RFC2616 section 14.9.4.
authorGraham Leggett <minfrin@apache.org>
Sat, 16 Oct 2010 23:32:45 +0000 (23:32 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 16 Oct 2010 23:32:45 +0000 (23:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023389 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_cache.c

index a34ffc8b4464962d6d02affcd950b3b755dc256a..0d0a8dc9ea2ed1e6368871d8255ef588dacf7442 100644 (file)
@@ -797,7 +797,8 @@ static int cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
         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 *f, apr_bucket_brigade *in)
         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(request_rec *r)
         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 =