Commit 9620dbc9 authored by Graham Leggett's avatar Graham Leggett
Browse files

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
parent 1348b889
Loading
Loading
Loading
Loading
+20 −3
Changes for modules/cache/mod_cache.c: 20 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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)
{
    /* we are just a marker, so let's just remove ourselves */

    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 twice, or was added in quick "
            "handler mode and will be ignored.");
                "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_remove_output_filter(f);
    return ap_pass_brigade(f->next, in);
}