From: André Malo Date: Thu, 24 Jul 2003 15:26:56 +0000 (+0000) Subject: that loop was totally bogus. X-Git-Tag: pre_ajp_proxy~1375 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9ca268476373df0a78713d71739034917bd9bbc;p=apache that loop was totally bogus. r->content_type contains no more than one c-t use ap_field_noparam to strip the decoration and just a single condition to check the validity of r->content_type git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100763 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/core.c b/server/core.c index 8ef3b9a66f..be4fead93c 100644 --- a/server/core.c +++ b/server/core.c @@ -2804,7 +2804,7 @@ static const char *add_ct_output_filters(cmd_parms *cmd, void *conf_, void ap_add_output_filters_by_type(request_rec *r) { core_dir_config *conf; - const char *ctype, *ctypes; + const char *ctype; conf = (core_dir_config *)ap_get_module_config(r->per_dir_config, &core_module); @@ -2817,10 +2817,9 @@ void ap_add_output_filters_by_type(request_rec *r) return; } - ctypes = r->content_type; - - /* We must be able to handle decorated content-types. */ - while (*ctypes && (ctype = ap_getword(r->pool, &ctypes, ';'))) { + /* remove c-t decoration */ + ctype = ap_field_noparam(r->pool, r->content_type); + if (ctype) { ap_filter_rec_t *ct_filter; ct_filter = apr_hash_get(conf->ct_output_filters, ctype, APR_HASH_KEY_STRING);