httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject cvs commit: httpd-2.0/modules/experimental mod_charset_lite.c
Date Thu, 30 Aug 2001 12:29:37 GMT
trawick     01/08/30 05:29:37

  Modified:    modules/experimental mod_charset_lite.c
  Log:
  since the core now stores the input and output filter lists in a
  different format, mod_charset_lite needs different logic to walk
  through it
  
  Revision  Changes    Path
  1.49      +18 -14    httpd-2.0/modules/experimental/mod_charset_lite.c
  
  Index: mod_charset_lite.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_charset_lite.c,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- mod_charset_lite.c	2001/08/07 16:19:02	1.48
  +++ mod_charset_lite.c	2001/08/30 12:29:37	1.49
  @@ -373,34 +373,38 @@
       return DECLINED;
   }
   
  +static int configured_in_list(request_rec *r, const char *filter_name,
  +                              const char *filter_list)
  +{
  +    const char *filter;
  +
  +    if (filter_list) {
  +        while ((filter = ap_getword(r->pool, &filter_list, ';')) && filter[0])
{
  +            /* yeah, I'm an ass and expect them to type it correctly (all caps)
  +             */
  +            if (!strcmp(filter, filter_name))
  +                return 1;
  +        }
  +    }
  +    return 0;
  +}
  +
   static int configured_on_input(request_rec *r, const char *filter_name)
   {
  -    int i;
       core_dir_config *conf =
           (core_dir_config *)ap_get_module_config(r->per_dir_config,
                                                   &core_module);
  -    char **items = (char **)conf->input_filters->elts;
   
  -    for (i = 0; i < conf->input_filters->nelts; i++) {
  -        if (!strcmp(items[i], filter_name))
  -            return 1;
  -    }
  -    return 0;
  +    return configured_in_list(r, filter_name, conf->input_filters);
   }
   
   static int configured_on_output(request_rec *r, const char *filter_name)
   {
  -    int i;
       core_dir_config *conf =
           (core_dir_config *)ap_get_module_config(r->per_dir_config,
                                                   &core_module);
  -    char **items = (char **)conf->output_filters->elts;
   
  -    for (i = 0; i < conf->output_filters->nelts; i++) {
  -        if (!strcmp(items[i], filter_name))
  -            return 1;
  -    }
  -    return 0;
  +    return configured_in_list(r, filter_name, conf->output_filters);
   }
   
   /* xlate_insert_filter() is a filter hook which decides whether or not
  
  
  

Mime
View raw message