]> granicus.if.org Git - apache/commitdiff
Allow AddOutputFilterByType to take in multiple filters.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Sun, 15 Sep 2002 00:30:56 +0000 (00:30 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Sun, 15 Sep 2002 00:30:56 +0000 (00:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96819 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
server/core.c

diff --git a/CHANGES b/CHANGES
index 975a455cfa676feb4e8613be653bc38bfec20a18..92c8aa077fcad558a00309df6e31e39132f1c6f5 100644 (file)
--- 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
index 234de4af93788eb211dcfea1a7215e72e1b6cca9..2dc2887a35f936da4a8ed60baacbc842927e5ae6 100644 (file)
@@ -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);