diff options
author | Nick Kew <niq@apache.org> | 2016-01-25 23:31:19 +0100 |
---|---|---|
committer | Nick Kew <niq@apache.org> | 2016-01-25 23:31:19 +0100 |
commit | 371b438a8a66cb6d76a87d14fe54af46c9a190d3 (patch) | |
tree | d8e7f35989926a870c3355a3669eeff2bc5f1d77 /modules/filters | |
parent | xforms (diff) | |
download | apache2-371b438a8a66cb6d76a87d14fe54af46c9a190d3.tar.xz apache2-371b438a8a66cb6d76a87d14fe54af46c9a190d3.zip |
mod_filter: Fix AddOutputFilterByType with non-content-level filters.
PR58856 (Micha Lenk)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726705 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/filters')
-rw-r--r-- | modules/filters/mod_filter.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/filters/mod_filter.c b/modules/filters/mod_filter.c index 7b692233ee..5b5ecf6971 100644 --- a/modules/filters/mod_filter.c +++ b/modules/filters/mod_filter.c @@ -444,6 +444,12 @@ static const char *add_filter(cmd_parms *cmd, void *CFG, ap_expr_info_t *node; const char *err = NULL; + /* if provider has been registered, we can look it up */ + provider_frec = ap_get_output_filter_handle(pname); + if (!provider_frec) { + return apr_psprintf(cmd->pool, "Unknown filter provider %s", pname); + } + /* fname has been declared with DeclareFilter, so we can look it up */ frec = apr_hash_get(cfg->live_filters, fname, APR_HASH_KEY_STRING); @@ -454,17 +460,13 @@ static const char *add_filter(cmd_parms *cmd, void *CFG, return c; } frec = apr_hash_get(cfg->live_filters, fname, APR_HASH_KEY_STRING); + frec->ftype = provider_frec->ftype; } if (!frec) { return apr_psprintf(cmd->pool, "Undeclared smart filter %s", fname); } - /* if provider has been registered, we can look it up */ - provider_frec = ap_get_output_filter_handle(pname); - if (!provider_frec) { - return apr_psprintf(cmd->pool, "Unknown filter provider %s", pname); - } provider = apr_palloc(cmd->pool, sizeof(ap_filter_provider_t)); if (expr) { node = ap_expr_parse_cmd(cmd, expr, 0, &err, NULL); |