]> granicus.if.org Git - apache/commitdiff
Fix the sense of the must_revalidate comparison. Replace a further call to
authorGraham Leggett <minfrin@apache.org>
Sat, 16 Oct 2010 23:24:09 +0000 (23:24 +0000)
committerGraham Leggett <minfrin@apache.org>
Sat, 16 Oct 2010 23:24:09 +0000 (23:24 +0000)
ap_cache_liststr() with a pre-parsed value.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1023388 13f79535-47bb-0310-9956-ffa450edef68

modules/cache/mod_cache.c

index ae2915e244d9ed69d043fa1d65c8a8866d4ad222..a34ffc8b4464962d6d02affcd950b3b755dc256a 100644 (file)
@@ -797,7 +797,7 @@ 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) {
             const char *warn_head;
 
             /* morph the current save filter into the out filter, and serve from
@@ -1600,9 +1600,8 @@ static void cache_insert_error_filter(request_rec *r)
     if (dummy) {
         cache_request_rec *cache = (cache_request_rec *) dummy;
 
-        if (cache->stale_handle && cache->save_filter && !ap_cache_liststr(
-                NULL, apr_table_get(cache->stale_handle->resp_hdrs,
-                        "Cache-Control"), "must-revalidate", NULL)) {
+        if (cache->stale_handle && cache->save_filter
+                && !cache->stale_handle->cache_obj->info.control.must_revalidate) {
             const char *warn_head;
             cache_server_conf
                     *conf =