]> granicus.if.org Git - apache/commitdiff
mod_cache: Clarify which scenario we have present, quick handler on and CACHE
authorGraham Leggett <minfrin@apache.org>
Mon, 23 May 2011 16:41:00 +0000 (16:41 +0000)
committerGraham Leggett <minfrin@apache.org>
Mon, 23 May 2011 16:41:00 +0000 (16:41 +0000)
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

modules/cache/mod_cache.c

index cfeec0257b5d53948cedde1101f4735c491a86b6..83abb634cbe558ba37022672173d35d744480bdd 100644 (file)
@@ -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);
 }