Commit 9b4488b1 authored by Nick Kew's avatar Nick Kew
Browse files

PR#39672: Check that filter exists before trying to insert it


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@410079 13f79535-47bb-0310-9956-ffa450edef68
parent 828f0911
Loading
Loading
Loading
Loading
+5 −0
Changes for modules/filters/mod_filter.c: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -755,6 +755,11 @@ static void filter_insert(request_rec *r)

    for (p = cfg->chain; p; p = p->next) {
        filter = apr_hash_get(cfg->live_filters, p->fname, APR_HASH_KEY_STRING);
        if (filter == NULL) {
            ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
                          "Unknown filter %s not added", p->fname);
            continue;
        }
        ap_add_output_filter_handle(filter, NULL, r, r->connection);
#ifndef NO_PROTOCOL
        if (ranges && (filter->proto_flags