From: André Malo Date: Thu, 24 Jul 2003 14:36:54 +0000 (+0000) Subject: don't reverse the filter order in AddOutputFilterByType X-Git-Tag: pre_ajp_proxy~1376 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cc0bce57b0b6408a6252816f98c4f4170ddc1183;p=apache don't reverse the filter order in AddOutputFilterByType git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100760 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index da425cc431..8ef3b9a66f 100644 --- a/server/core.c +++ b/server/core.c @@ -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; } /*