From: Justin Erenkrantz Date: Sun, 15 Sep 2002 00:30:56 +0000 (+0000) Subject: Allow AddOutputFilterByType to take in multiple filters. X-Git-Tag: 2.0.42~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92b395d7547aff2d3fec5f9cc6d74c6b6d5b3c96;p=thirdparty%2Fapache%2Fhttpd.git Allow AddOutputFilterByType to take in multiple filters. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96819 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 975a455cfa6..92c8aa077fc 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Changes with Apache 2.0.42 + *) Allow AddOutputFilterByType to add multiple filters per directive. + [Justin Erenkrantz] + *) Remove warnings with Sun's Forte compiler. [Justin Erenkrantz] *) Fixed mod_disk_cache's generation of 304s diff --git a/server/core.c b/server/core.c index 234de4af937..2dc2887a35f 100644 --- a/server/core.c +++ b/server/core.c @@ -2578,6 +2578,7 @@ static const char *add_ct_output_filters(cmd_parms *cmd, void *conf_, { core_dir_config *conf = conf_; ap_filter_rec_t *old, *new; + const char *filter_name; if (!conf->ct_output_filters) { conf->ct_output_filters = apr_hash_make(cmd->pool); @@ -2588,12 +2589,16 @@ static const char *add_ct_output_filters(cmd_parms *cmd, void *conf_, APR_HASH_KEY_STRING); } - new = apr_pcalloc(cmd->pool, sizeof(ap_filter_rec_t)); - new->name = apr_pstrdup(cmd->pool, arg); + while (*arg && + (filter_name = ap_getword(cmd->pool, &arg, ';'))) { + new = apr_pcalloc(cmd->pool, sizeof(ap_filter_rec_t)); + new->name = filter_name; - /* We found something, so let's append it. */ - if (old) { - new->next = old; + /* We found something, so let's append it. */ + if (old) { + new->next = old; + } + old = new; } apr_hash_set(conf->ct_output_filters, arg2, APR_HASH_KEY_STRING, new);