]> granicus.if.org Git - apache/commitdiff
don't reverse the filter order in AddOutputFilterByType
authorAndré Malo <nd@apache.org>
Thu, 24 Jul 2003 14:36:54 +0000 (14:36 +0000)
committerAndré Malo <nd@apache.org>
Thu, 24 Jul 2003 14:36:54 +0000 (14:36 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100760 13f79535-47bb-0310-9956-ffa450edef68

server/core.c

index da425cc431f73dbed8de670c2b0d288b084c2e64..8ef3b9a66f0426b5bee0ea944d2724051fb5fe5c 100644 (file)
@@ -2764,6 +2764,12 @@ static const char *add_ct_output_filters(cmd_parms *cmd, void *conf_,
     else {
         old = (ap_filter_rec_t*) apr_hash_get(conf->ct_output_filters, arg2,
                                               APR_HASH_KEY_STRING);
+        /* find last entry */
+        if (old) {
+            while (old->next) {
+                old = old->next;
+            }
+        }
     }
 
     while (*arg &&
@@ -2774,7 +2780,11 @@ static const char *add_ct_output_filters(cmd_parms *cmd, void *conf_,
 
         /* We found something, so let's append it.  */
         if (old) {
-            new->next = old;
+            old->next = new;
+        }
+        else {
+            apr_hash_set(conf->ct_output_filters, arg2,
+                         APR_HASH_KEY_STRING, new);
         }
         old = new;
     }
@@ -2783,8 +2793,6 @@ static const char *add_ct_output_filters(cmd_parms *cmd, void *conf_,
         return "invalid filter name";
     }
     
-    apr_hash_set(conf->ct_output_filters, arg2, APR_HASH_KEY_STRING, new);
-
     return NULL;
 }
 /*