From: Graham Leggett Date: Mon, 23 May 2011 16:41:00 +0000 (+0000) Subject: mod_cache: Clarify which scenario we have present, quick handler on and CACHE X-Git-Tag: 2.3.13~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f23aeced4029a9329c8e78481805579c3bc9f2b1;p=thirdparty%2Fapache%2Fhttpd.git mod_cache: Clarify which scenario we have present, quick handler on and CACHE filter present, which is an error, or the CACHE filter being present when the cache is bypassed, which is business as usual. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1126575 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/cache/mod_cache.c b/modules/cache/mod_cache.c index cfeec0257b5..83abb634cbe 100644 --- a/modules/cache/mod_cache.c +++ b/modules/cache/mod_cache.c @@ -1530,10 +1530,27 @@ static int cache_remove_url_filter(ap_filter_t *f, apr_bucket_brigade *in) */ static int cache_filter(ap_filter_t *f, apr_bucket_brigade *in) { + + cache_server_conf + *conf = + (cache_server_conf *) ap_get_module_config(f->r->server->module_config, + &cache_module); + + /* was the quick handler enabled */ + if (conf->quick) { + ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r, + "cache: CACHE filter was added in quick handler mode and " + "will be ignored: %s", f->r->unparsed_uri); + } + /* otherwise we may have been bypassed, nothing to see here */ + else { + ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, + "cache: CACHE filter was added twice, or was added where " + "the cache has been bypassed and will be ignored: %s", + f->r->unparsed_uri); + } + /* we are just a marker, so let's just remove ourselves */ - ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, f->r, - "cache: CACHE filter was added twice, or was added in quick " - "handler mode and will be ignored."); ap_remove_output_filter(f); return ap_pass_brigade(f->next, in); }