You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by mi...@apache.org on 2011/05/23 18:41:01 UTC

svn commit: r1126575 - /httpd/httpd/trunk/modules/cache/mod_cache.c

Author: minfrin
Date: Mon May 23 16:41:00 2011
New Revision: 1126575

URL: http://svn.apache.org/viewvc?rev=1126575&view=rev
Log:
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.

Modified:
    httpd/httpd/trunk/modules/cache/mod_cache.c

Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1126575&r1=1126574&r2=1126575&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Mon May 23 16:41:00 2011
@@ -1530,10 +1530,27 @@ static int cache_remove_url_filter(ap_fi
  */
 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);
 }