httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/perchild perchild.c
Date Thu, 07 Mar 2002 09:27:17 GMT
jerenkrantz    02/03/07 01:27:17

  Modified:    include  ap_mmn.h util_filter.h
               modules/experimental mod_cache.c mod_case_filter.c
                        mod_case_filter_in.c mod_charset_lite.c
                        mod_deflate.c mod_ext_filter.c
               modules/filters mod_include.c
               modules/http http_core.c
               modules/metadata mod_headers.c
               modules/proxy proxy_ftp.c
               modules/test mod_bucketeer.c
               server   core.c util_filter.c
               server/mpm/perchild perchild.c
  Log:
  As hinted on dev@httpd, change filter naming schemes to match our
  expectations of their usage.
  
  The reason that we should make this change now is that we have changed
  the implied meaning of AP_FTYPE_HTTP_HEADER - some users of this should
  be PROTOCOL while others should be CONTENT_SET.  In order to clarify it,
  toss all of the bogus names and force the filter writers to make sure
  they understand what they are doing.
  
  CONTENT_SET is new (horrible name - change if you have better idea), but
  it indicates that it should run between RESOURCE and PROTOCOL.
  mod_deflate is the ideal CONTENT_SET filter.
  
  The changed type names are:
  CONTENT is now RESOURCE.
  HTTP_HEADER is now PROTOCOL.  However, most filters that used HTTP_HEADER
  may want CONTENT_SET.  (Only things like POP and HTTP belong as PROTOCOL.)
  
  MMN bump since all filters need to be recompiled due to filter reordering.
  
  Revision  Changes    Path
  1.36      +2 -1      httpd-2.0/include/ap_mmn.h
  
  Index: ap_mmn.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/ap_mmn.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- ap_mmn.h	3 Mar 2002 06:05:58 -0000	1.35
  +++ ap_mmn.h	7 Mar 2002 09:27:15 -0000	1.36
  @@ -98,12 +98,13 @@
    * 20020218 (2.0.33-dev) bump for AddOutputFilterByType directive
    * 20020220 (2.0.33-dev) bump for scoreboard.h structure change
    * 20020302 (2.0.33-dev) bump for protocol_filter additions.
  + * 20020306 (2.0.34-dev) bump for filter type renames.
    */
   
   #define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */
   
   #ifndef MODULE_MAGIC_NUMBER_MAJOR
  -#define MODULE_MAGIC_NUMBER_MAJOR 20020302
  +#define MODULE_MAGIC_NUMBER_MAJOR 20020306
   #endif
   #define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */
   #define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR	/* backward compat */
  
  
  
  1.69      +14 -11    httpd-2.0/include/util_filter.h
  
  Index: util_filter.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/util_filter.h,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- util_filter.h	7 Mar 2002 02:09:30 -0000	1.68
  +++ util_filter.h	7 Mar 2002 09:27:15 -0000	1.69
  @@ -185,26 +185,29 @@
   typedef enum {
       /** These filters are used to alter the content that is passed through
        *  them. Examples are SSI or PHP. */
  -    AP_FTYPE_CONTENT     = 10,
  -    /** (XXX somebody rename me or get rid of me please)
  -     *  This special type ensures that the HTTP header filter ends up in
  -     *  the proper location in the filter chain. */
  -    AP_FTYPE_HTTP_HEADER = 20,
  +    AP_FTYPE_RESOURCE     = 10,
  +    /** These filters are used to alter the content as a whole, but after all
  +     *  AP_FTYPE_RESOURCE filters are executed.  These filters should not
  +     *  change the content-type.  An example is deflate.  */
  +    AP_FTYPE_CONTENT_SET  = 20,
  +    /** These filters are used to handle the protocol between server and
  +     *  client.  Examples are HTTP and POP. */
  +    AP_FTYPE_PROTOCOL     = 30,
       /** These filters implement transport encodings (e.g., chunking). */
  -    AP_FTYPE_TRANSCODE   = 30,
  +    AP_FTYPE_TRANSCODE    = 40,
       /** These filters will alter the content, but in ways that are
        *  more strongly associated with the connection.  Examples are
  -     *  splitting * an HTTP connection into multiple requests and
  -     *  buffering HTTP * responses across multiple requests.
  +     *  splitting an HTTP connection into multiple requests and
  +     *  buffering HTTP responses across multiple requests.
        *
        *  It is important to note that these types of filters are not
        *  allowed in a sub-request. A sub-request's output can certainly
  -     *  be filtered by ::AP_FTYPE_CONTENT filters, but all of the "final
  +     *  be filtered by ::AP_FTYPE_RESOURCE filters, but all of the "final
        *  processing" is determined by the main request. */
  -    AP_FTYPE_CONNECTION  = 40,
  +    AP_FTYPE_CONNECTION  = 50,
       /** These filters don't alter the content.  They are responsible for
        *  sending/receiving data to/from the client. */
  -    AP_FTYPE_NETWORK     = 50
  +    AP_FTYPE_NETWORK     = 60
   } ap_filter_type;
   
   /**
  
  
  
  1.32      +3 -3      httpd-2.0/modules/experimental/mod_cache.c
  
  Index: mod_cache.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_cache.c	4 Mar 2002 17:13:08 -0000	1.31
  +++ mod_cache.c	7 Mar 2002 09:27:15 -0000	1.32
  @@ -998,13 +998,13 @@
        */
       ap_register_output_filter("CACHE_IN", 
                                 cache_in_filter, 
  -                              AP_FTYPE_CONTENT+1);
  +                              AP_FTYPE_CONTENT_SET);
       ap_register_output_filter("CACHE_OUT", 
                                 cache_out_filter, 
  -                              AP_FTYPE_CONTENT+1);
  +                              AP_FTYPE_CONTENT_SET);
       ap_register_output_filter("CACHE_CONDITIONAL", 
                                 cache_conditional_filter, 
  -                              AP_FTYPE_CONTENT+1);
  +                              AP_FTYPE_CONTENT_SET);
       ap_hook_post_config(cache_post_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
   }
   
  
  
  
  1.9       +1 -1      httpd-2.0/modules/experimental/mod_case_filter.c
  
  Index: mod_case_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_case_filter.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- mod_case_filter.c	10 Jan 2002 09:11:32 -0000	1.8
  +++ mod_case_filter.c	7 Mar 2002 09:27:15 -0000	1.9
  @@ -100,7 +100,7 @@
       {
       ap_hook_insert_filter(CaseFilterInsertFilter,NULL,NULL,APR_HOOK_MIDDLE);
       ap_register_output_filter(s_szCaseFilterName,CaseFilterOutFilter,
  -			      AP_FTYPE_CONTENT);
  +			      AP_FTYPE_RESOURCE);
       }
   
   module AP_MODULE_DECLARE_DATA case_filter_module =
  
  
  
  1.13      +1 -1      httpd-2.0/modules/experimental/mod_case_filter_in.c
  
  Index: mod_case_filter_in.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_case_filter_in.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_case_filter_in.c	25 Jan 2002 01:11:46 -0000	1.12
  +++ mod_case_filter_in.c	7 Mar 2002 09:27:15 -0000	1.13
  @@ -181,7 +181,7 @@
       ap_hook_insert_filter(CaseFilterInInsertFilter, NULL, NULL, 
                             APR_HOOK_MIDDLE);
       ap_register_input_filter(s_szCaseFilterName, CaseFilterInFilter,
  -                             AP_FTYPE_CONTENT);
  +                             AP_FTYPE_RESOURCE);
   }
   
   module AP_MODULE_DECLARE_DATA case_filter_in_module =
  
  
  
  1.59      +2 -2      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.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- mod_charset_lite.c	1 Mar 2002 05:43:57 -0000	1.58
  +++ mod_charset_lite.c	7 Mar 2002 09:27:15 -0000	1.59
  @@ -1100,9 +1100,9 @@
       ap_hook_fixups(find_code_page, NULL, NULL, APR_HOOK_MIDDLE);
       ap_hook_insert_filter(xlate_insert_filter, NULL, NULL, APR_HOOK_REALLY_LAST);
       ap_register_output_filter(XLATEOUT_FILTER_NAME, xlate_out_filter, 
  -                              AP_FTYPE_CONTENT);
  +                              AP_FTYPE_RESOURCE);
       ap_register_input_filter(XLATEIN_FILTER_NAME, xlate_in_filter, 
  -                             AP_FTYPE_CONTENT);
  +                             AP_FTYPE_RESOURCE);
   }
   
   module AP_MODULE_DECLARE_DATA charset_lite_module =
  
  
  
  1.7       +1 -1      httpd-2.0/modules/experimental/mod_deflate.c
  
  Index: mod_deflate.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_deflate.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- mod_deflate.c	27 Feb 2002 21:49:33 -0000	1.6
  +++ mod_deflate.c	7 Mar 2002 09:27:15 -0000	1.7
  @@ -445,7 +445,7 @@
   static void register_hooks(apr_pool_t * p)
   {
       ap_register_output_filter(deflateFilterName, deflate_out_filter,
  -                              AP_FTYPE_HTTP_HEADER);
  +                              AP_FTYPE_CONTENT_SET);
   }
   
   static const command_rec deflate_filter_cmds[] = {
  
  
  
  1.21      +2 -2      httpd-2.0/modules/experimental/mod_ext_filter.c
  
  Index: mod_ext_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_ext_filter.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- mod_ext_filter.c	25 Jan 2002 01:11:46 -0000	1.20
  +++ mod_ext_filter.c	7 Mar 2002 09:27:15 -0000	1.21
  @@ -310,12 +310,12 @@
        */
       if (filter->mode == OUTPUT_FILTER) {
           /* XXX need a way to ensure uniqueness among all filters */
  -        ap_register_output_filter(filter->name, ef_output_filter, AP_FTYPE_CONTENT);
  +        ap_register_output_filter(filter->name, ef_output_filter, AP_FTYPE_RESOURCE);
       }
   #if 0              /* no input filters yet */
       else if (filter->mode == INPUT_FILTER) {
           /* XXX need a way to ensure uniqueness among all filters */
  -        ap_register_input_filter(filter->name, ef_input_filter, AP_FTYPE_CONTENT);
  +        ap_register_input_filter(filter->name, ef_input_filter, AP_FTYPE_RESOURCE);
       }
   #endif
       else {
  
  
  
  1.195     +1 -1      httpd-2.0/modules/filters/mod_include.c
  
  Index: mod_include.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/filters/mod_include.c,v
  retrieving revision 1.194
  retrieving revision 1.195
  diff -u -r1.194 -r1.195
  --- mod_include.c	28 Feb 2002 23:24:08 -0000	1.194
  +++ mod_include.c	7 Mar 2002 09:27:16 -0000	1.195
  @@ -3457,7 +3457,7 @@
       APR_REGISTER_OPTIONAL_FN(ap_register_include_handler);
       ap_hook_post_config(include_post_config, NULL, NULL, APR_HOOK_REALLY_FIRST);
       ap_hook_fixups(include_fixup, NULL, NULL, APR_HOOK_LAST);
  -    ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_CONTENT);
  +    ap_register_output_filter("INCLUDES", includes_filter, AP_FTYPE_RESOURCE);
   }
   
   module AP_MODULE_DECLARE_DATA include_module =
  
  
  
  1.298     +3 -3      httpd-2.0/modules/http/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
  retrieving revision 1.297
  retrieving revision 1.298
  diff -u -r1.297 -r1.298
  --- http_core.c	7 Mar 2002 08:23:56 -0000	1.297
  +++ http_core.c	7 Mar 2002 09:27:16 -0000	1.298
  @@ -326,15 +326,15 @@
       ap_hook_create_request(http_create_request, NULL, NULL, APR_HOOK_REALLY_LAST);
       ap_http_input_filter_handle =
           ap_register_input_filter("HTTP_IN", ap_http_filter,
  -                                 AP_FTYPE_HTTP_HEADER);
  +                                 AP_FTYPE_PROTOCOL);
       ap_http_header_filter_handle =
           ap_register_output_filter("HTTP_HEADER", ap_http_header_filter, 
  -                                  AP_FTYPE_HTTP_HEADER);
  +                                  AP_FTYPE_PROTOCOL);
       ap_chunk_filter_handle =
           ap_register_output_filter("CHUNK", chunk_filter, AP_FTYPE_TRANSCODE);
       ap_byterange_filter_handle =
           ap_register_output_filter("BYTERANGE", ap_byterange_filter,
  -                                  AP_FTYPE_HTTP_HEADER);
  +                                  AP_FTYPE_PROTOCOL);
   }
   
   module AP_MODULE_DECLARE_DATA http_module = {
  
  
  
  1.37      +1 -1      httpd-2.0/modules/metadata/mod_headers.c
  
  Index: mod_headers.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/metadata/mod_headers.c,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- mod_headers.c	28 Jan 2002 23:49:39 -0000	1.36
  +++ mod_headers.c	7 Mar 2002 09:27:16 -0000	1.37
  @@ -620,7 +620,7 @@
       ap_hook_pre_config(header_pre_config,NULL,NULL,APR_HOOK_MIDDLE);
       ap_hook_insert_filter(ap_headers_insert_output_filter, NULL, NULL, APR_HOOK_LAST);
       ap_hook_fixups(ap_headers_fixup, NULL, NULL, APR_HOOK_LAST);
  -    ap_register_output_filter("FIXUP_HEADERS_OUT", ap_headers_output_filter, AP_FTYPE_HTTP_HEADER);
  +    ap_register_output_filter("FIXUP_HEADERS_OUT", ap_headers_output_filter, AP_FTYPE_CONTENT_SET);
   }
   
   module AP_MODULE_DECLARE_DATA headers_module =
  
  
  
  1.112     +1 -1      httpd-2.0/modules/proxy/proxy_ftp.c
  
  Index: proxy_ftp.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_ftp.c,v
  retrieving revision 1.111
  retrieving revision 1.112
  diff -u -r1.111 -r1.112
  --- proxy_ftp.c	5 Feb 2002 22:18:49 -0000	1.111
  +++ proxy_ftp.c	7 Mar 2002 09:27:16 -0000	1.112
  @@ -1859,7 +1859,7 @@
       proxy_hook_scheme_handler(ap_proxy_ftp_handler, NULL, NULL, APR_HOOK_MIDDLE);
       proxy_hook_canon_handler(ap_proxy_ftp_canon, NULL, NULL, APR_HOOK_MIDDLE);
       /* filters */
  -    ap_register_output_filter("PROXY_SEND_DIR", ap_proxy_send_dir_filter, AP_FTYPE_CONTENT);
  +    ap_register_output_filter("PROXY_SEND_DIR", ap_proxy_send_dir_filter, AP_FTYPE_RESOURCE);
   }
   
   module AP_MODULE_DECLARE_DATA proxy_ftp_module = {
  
  
  
  1.6       +1 -1      httpd-2.0/modules/test/mod_bucketeer.c
  
  Index: mod_bucketeer.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/test/mod_bucketeer.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_bucketeer.c	27 Feb 2002 20:44:49 -0000	1.5
  +++ mod_bucketeer.c	7 Mar 2002 09:27:16 -0000	1.6
  @@ -194,7 +194,7 @@
   static void register_hooks(apr_pool_t * p)
   {
       ap_register_output_filter(bucketeerFilterName, bucketeer_out_filter,
  -                              AP_FTYPE_CONTENT-1);
  +                              AP_FTYPE_RESOURCE-1);
   }
   
   static const command_rec bucketeer_filter_cmds[] = {
  
  
  
  1.161     +5 -5      httpd-2.0/server/core.c
  
  Index: core.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/core.c,v
  retrieving revision 1.160
  retrieving revision 1.161
  diff -u -r1.160 -r1.161
  --- core.c	7 Mar 2002 02:09:30 -0000	1.160
  +++ core.c	7 Mar 2002 09:27:16 -0000	1.161
  @@ -3141,7 +3141,7 @@
       d = (core_dir_config *)ap_get_module_config(r->per_dir_config,
                                                   &core_module);
       bld_content_md5 = (d->content_md5 & 1)
  -                      && r->output_filters->frec->ftype != AP_FTYPE_CONTENT;
  +                      && r->output_filters->frec->ftype != AP_FTYPE_RESOURCE;
   
       ap_allow_standard_methods(r, MERGE_ALLOW, M_GET, M_OPTIONS, M_POST, -1);
   
  @@ -4031,18 +4031,18 @@
                                    AP_FTYPE_NETWORK);
       ap_net_time_filter_handle =
           ap_register_input_filter("NET_TIME", net_time_filter,
  -                                 AP_FTYPE_HTTP_HEADER);
  +                                 AP_FTYPE_PROTOCOL);
       ap_content_length_filter_handle =
           ap_register_output_filter("CONTENT_LENGTH", ap_content_length_filter,
  -                                  AP_FTYPE_HTTP_HEADER);
  +                                  AP_FTYPE_PROTOCOL);
       ap_core_output_filter_handle =
           ap_register_output_filter("CORE", core_output_filter,
                                     AP_FTYPE_NETWORK);
       ap_subreq_core_filter_handle =
           ap_register_output_filter("SUBREQ_CORE", ap_sub_req_output_filter,
  -                                  AP_FTYPE_CONTENT + 5);
  +                                  AP_FTYPE_CONTENT_SET);
       ap_old_write_func = ap_register_output_filter("OLD_WRITE",
  -                                   ap_old_write_filter, AP_FTYPE_CONTENT - 10);
  +                                   ap_old_write_filter, AP_FTYPE_RESOURCE - 10);
   }
   
   AP_DECLARE_DATA module core_module = {
  
  
  
  1.88      +1 -1      httpd-2.0/server/util_filter.c
  
  Index: util_filter.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- util_filter.c	7 Mar 2002 08:58:21 -0000	1.87
  +++ util_filter.c	7 Mar 2002 09:27:16 -0000	1.88
  @@ -301,7 +301,7 @@
       ap_filter_t *f = apr_palloc(p, sizeof(*f));
       ap_filter_t **outf;
   
  -    if (frec->ftype < AP_FTYPE_HTTP_HEADER) {
  +    if (frec->ftype < AP_FTYPE_PROTOCOL) {
           if (r) {
               outf = r_filters;
           }
  
  
  
  1.111     +1 -1      httpd-2.0/server/mpm/perchild/perchild.c
  
  Index: perchild.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/perchild/perchild.c,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- perchild.c	21 Feb 2002 18:52:28 -0000	1.110
  +++ perchild.c	7 Mar 2002 09:27:17 -0000	1.111
  @@ -1754,7 +1754,7 @@
       ap_hook_post_read_request(perchild_post_read, NULL, NULL,
                                 APR_HOOK_REALLY_FIRST);
       ap_register_input_filter("PERCHILD_BUFFER", perchild_buffer,
  -                             AP_FTYPE_CONTENT);
  +                             AP_FTYPE_RESOURCE);
   }
   
   static const char *set_num_daemons(cmd_parms *cmd, void *dummy,
  
  
  

Mime
View raw message