From c80d38ba8c66bbf5f7334034e7a7a2cee068dc60 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sat, 16 Oct 2010 23:24:09 +0000 Subject: [PATCH] Fix the sense of the must_revalidate comparison. Replace a further call to 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 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index ae2915e244..a34ffc8b44 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -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 = -- 2.50.1