]> granicus.if.org Git - apache/commitdiff
that loop was totally bogus.
authorAndré Malo <nd@apache.org>
Thu, 24 Jul 2003 15:26:56 +0000 (15:26 +0000)
committerAndré Malo <nd@apache.org>
Thu, 24 Jul 2003 15:26:56 +0000 (15:26 +0000)
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

server/core.c

index 8ef3b9a66f0426b5bee0ea944d2724051fb5fe5c..be4fead93cbe0b60b96543235f30eb1414bd9d94 100644 (file)
@@ -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);