httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: httpd-2.0/modules/http mod_mime.c
Date Sat, 10 Feb 2001 05:30:52 GMT
rbb         01/02/09 21:30:52

  Modified:    modules/http mod_mime.c
  Log:
  Remove the SetFilter directive from the code.  This directive wasn't
  nearly as useful as the SetOutputFilter and SetInputFilter, and it never
  really worked properly.
  
  Revision  Changes    Path
  1.36      +0 -34     httpd-2.0/modules/http/mod_mime.c
  
  Index: mod_mime.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -d -b -w -u -r1.35 -r1.36
  --- mod_mime.c	2001/02/08 07:44:04	1.35
  +++ mod_mime.c	2001/02/10 05:30:51	1.36
  @@ -101,7 +101,6 @@
       apr_table_t *language_types;      /* Added with AddLanguage... */
       apr_table_t *handlers;            /* Added with AddHandler...  */
       apr_table_t *charset_types;       /* Added with AddCharset... */       
  -    apr_table_t *filter_names;        /* Added with SetFilterStack... */       
       apr_array_header_t *handlers_remove;  /* List of handlers to remove */
       apr_array_header_t *types_remove;     /* List of MIME types to remove */
       apr_array_header_t *encodings_remove; /* List of encodings to remove */
  @@ -142,7 +141,6 @@
       new->encoding_types = apr_table_make(p, 4);
       new->charset_types = apr_table_make(p, 4);
       new->language_types = apr_table_make(p, 4);
  -    new->filter_names = apr_table_make(p, 4);
       new->handlers = apr_table_make(p, 4);
       new->handlers_remove = apr_array_make(p, 4, sizeof(attrib_info));
       new->types_remove = apr_array_make(p, 4, sizeof(attrib_info));
  @@ -172,8 +170,6 @@
   					   base->charset_types);
       new->language_types = apr_table_overlay(p, add->language_types,
                                            base->language_types);
  -    new->filter_names = apr_table_overlay(p, add->filter_names,
  -                                   base->filter_names);
       new->handlers = apr_table_overlay(p, add->handlers,
                                      base->handlers);
   
  @@ -269,17 +265,6 @@
       return NULL;
   }
   
  -static const char *set_filter(cmd_parms *cmd, void *m_, const char *ct_,
  -                            const char *filt)
  -{
  -    mime_dir_config *m=m_;
  -    char *ct=apr_pstrdup(cmd->pool,ct_);
  -
  -    ap_str_tolower(ct);
  -    apr_table_addn(m->filter_names, ct, filt);
  -    return NULL;
  -}
  -
   /*
    * Note handler names that should be un-added for this location.  This
    * will keep the association from being inherited, as well, but not
  @@ -356,8 +341,6 @@
        "a language (e.g., fr), followed by one or more file extensions"),
   AP_INIT_ITERATE2("AddHandler", add_handler, NULL, OR_FILEINFO,
        "a handler name followed by one or more file extensions"),
  -AP_INIT_ITERATE2("SetFilter", set_filter, NULL, OR_FILEINFO, 
  -     "a mime type followed by one or more filters"),
   AP_INIT_TAKE1("ForceType", ap_set_string_slot_lower, 
        (void *)XtOffsetOf(mime_dir_config, type), OR_FILEINFO,
        "a media type"),
  @@ -824,27 +807,10 @@
       return OK;
   }
   
  -static int filter_chain(void *input, const char *key, const char *val)
  -{
  -    request_rec *r = input;
  -
  -    ap_add_output_filter(val, NULL, r, r->connection);
  -    return 1;
  -}
  -
  -static void mime_insert_filter(request_rec *r)
  -{
  -    mime_dir_config *conf =
  -    (mime_dir_config *) ap_get_module_config(r->per_dir_config, &mime_module);
  -
  -    apr_table_do(filter_chain, r, conf->filter_names, r->content_type, NULL);
  -}
  -
   static void register_hooks(apr_pool_t *p)
   {
       ap_hook_type_checker(find_ct,NULL,NULL,APR_HOOK_MIDDLE);
       ap_hook_post_config(mime_post_config,NULL,NULL,APR_HOOK_MIDDLE);
  -    ap_hook_insert_filter(mime_insert_filter, NULL, NULL, APR_HOOK_MIDDLE);
   }
   
   module AP_MODULE_DECLARE_DATA mime_module = {
  
  
  

Mime
View raw message