httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject cvs commit: httpd-2.0/server protocol.c
Date Mon, 21 May 2001 23:47:22 GMT
minfrin     01/05/21 16:47:22

  Modified:    modules/http http_core.c http_request.c
               modules/metadata mod_headers.c
               server   protocol.c
  Log:
  Move the addition of default AP_HTTP_HTTP_HEADER filters to the insert_filter
  phase so that other filters are not bypassed by default.
  
  Revision  Changes    Path
  1.276     +8 -0      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.275
  retrieving revision 1.276
  diff -u -r1.275 -r1.276
  --- http_core.c	2001/05/19 17:08:33	1.275
  +++ http_core.c	2001/05/21 23:47:15	1.276
  @@ -295,6 +295,13 @@
       return OK;
   }
   
  +static void ap_http_insert_filter(request_rec *r)
  +{
  +    ap_add_output_filter("BYTERANGE", NULL, r, r->connection);
  +    ap_add_output_filter("CONTENT_LENGTH", NULL, r, r->connection);
  +    ap_add_output_filter("HTTP_HEADER", NULL, r, r->connection);
  +}
  +
   static void register_hooks(apr_pool_t *p)
   {
       ap_hook_pre_connection(ap_pre_http_connection,NULL,NULL,
  @@ -304,6 +311,7 @@
       ap_hook_http_method(http_method,NULL,NULL,APR_HOOK_REALLY_LAST);
       ap_hook_default_port(http_port,NULL,NULL,APR_HOOK_REALLY_LAST);
   
  +    ap_hook_insert_filter(ap_http_insert_filter, NULL, NULL, APR_HOOK_REALLY_LAST);
       ap_register_input_filter("HTTP_IN", ap_http_filter, AP_FTYPE_CONNECTION);
       ap_register_input_filter("DECHUNK", ap_dechunk_filter, AP_FTYPE_TRANSCODE);
       ap_register_output_filter("HTTP_HEADER", ap_http_header_filter, 
  
  
  
  1.99      +0 -4      httpd-2.0/modules/http/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/http/http_request.c,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- http_request.c	2001/05/07 10:01:31	1.98
  +++ http_request.c	2001/05/21 23:47:16	1.99
  @@ -517,10 +517,6 @@
       new->output_filters  = r->connection->output_filters;
       new->input_filters   = r->connection->input_filters;
   
  -    ap_add_output_filter("BYTERANGE", NULL, new, new->connection);
  -    ap_add_output_filter("CONTENT_LENGTH", NULL, new, new->connection);
  -    ap_add_output_filter("HTTP_HEADER", NULL, new, new->connection);
  -
       apr_table_setn(new->subprocess_env, "REDIRECT_STATUS",
   	apr_psprintf(r->pool, "%d", r->status));
   
  
  
  
  1.25      +3 -3      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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- mod_headers.c	2001/05/20 09:31:04	1.24
  +++ mod_headers.c	2001/05/21 23:47:19	1.25
  @@ -231,7 +231,7 @@
   }
   
   /* handle RequestHeader directive */
  -static const char *header_in_cmd(cmd_parms *cmd, void *indirconf,
  +static const char *request_header_cmd(cmd_parms *cmd, void *indirconf,
                                 const char *action, const char *inhdr,
                                 const char *value)
   {
  @@ -317,7 +317,7 @@
   {
       AP_INIT_TAKE23("Header", header_cmd, NULL, OR_FILEINFO,
                      "an action, header and value"),
  -    AP_INIT_TAKE23("RequestHeader", header_in_cmd, NULL, OR_FILEINFO,
  +    AP_INIT_TAKE23("RequestHeader", request_header_cmd, NULL, OR_FILEINFO,
                      "an action, header and value"),
       {NULL}
   };
  @@ -326,7 +326,7 @@
   {
       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_CONTENT);
  +    ap_register_output_filter("FIXUP_HEADERS_OUT", ap_headers_output_filter, AP_FTYPE_HTTP_HEADER);
   }
   
   module AP_MODULE_DECLARE_DATA headers_module =
  
  
  
  1.21      +0 -4      httpd-2.0/server/protocol.c
  
  Index: protocol.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- protocol.c	2001/05/07 10:01:27	1.20
  +++ protocol.c	2001/05/21 23:47:21	1.21
  @@ -590,10 +590,6 @@
                        ? r->server->keep_alive_timeout * APR_USEC_PER_SEC
                        : r->server->timeout * APR_USEC_PER_SEC));
                        
  -    ap_add_output_filter("BYTERANGE", NULL, r, r->connection);
  -    ap_add_output_filter("CONTENT_LENGTH", NULL, r, r->connection);
  -    ap_add_output_filter("HTTP_HEADER", NULL, r, r->connection);
  -
       /* Get the request... */
       if (!read_request_line(r)) {
           if (r->status == HTTP_REQUEST_URI_TOO_LARGE) {
  
  
  

Mime
View raw message