httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n.@apache.org
Subject cvs commit: httpd-2.0/modules/metadata mod_headers.c
Date Sun, 06 Jun 2004 22:19:38 GMT
nd          2004/06/06 15:19:38

  Modified:    .        Tag: APACHE_2_0_BRANCH CHANGES STATUS
               modules/metadata Tag: APACHE_2_0_BRANCH mod_headers.c
  Log:
  Allow conditional RequestHeader directives.
  
  PR: 27951
  Basically submitted by: vincent gryzor.com (Vincent Deffontaines)
  Reviewed by: Jeff Trawick, Brad Nicholes, André Malo
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.988.2.295 +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.988.2.294
  retrieving revision 1.988.2.295
  diff -u -u -r1.988.2.294 -r1.988.2.295
  --- CHANGES	6 Jun 2004 13:23:25 -0000	1.988.2.294
  +++ CHANGES	6 Jun 2004 22:19:37 -0000	1.988.2.295
  @@ -1,5 +1,8 @@
   Changes with Apache 2.0.50
   
  +  *) Allow RequestHeader directives to be conditional. PR 27951.
  +     [Vincent Deffontaines <vincent gryzor.com>, André Malo]
  +
     *) Allow LimitRequestBody to be reset to unlimited. PR 29106
        [André Malo]
   
  
  
  
  1.751.2.903 +1 -5      httpd-2.0/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/STATUS,v
  retrieving revision 1.751.2.902
  retrieving revision 1.751.2.903
  diff -u -u -r1.751.2.902 -r1.751.2.903
  --- STATUS	6 Jun 2004 13:23:26 -0000	1.751.2.902
  +++ STATUS	6 Jun 2004 22:19:38 -0000	1.751.2.903
  @@ -161,10 +161,6 @@
   	     to the Header directive that allows a standard header definition
   	     to appear for all response types.
   
  -    *) mod_headers: Allow conditional RequestHeader directives. PR 27951
  -         modules/metadata/mod_headers.c: r1.52
  -       +1: nd, trawick, bnicholes
  -
       *) Allow URLs for ServerAdmin. PR 28174.
            server/core.c: r1.274
          +1: nd, bnicholes
  
  
  
  No                   revision
  No                   revision
  1.42.2.6  +6 -16     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.42.2.5
  retrieving revision 1.42.2.6
  diff -u -u -r1.42.2.5 -r1.42.2.6
  --- mod_headers.c	24 Apr 2004 11:51:07 -0000	1.42.2.5
  +++ mod_headers.c	6 Jun 2004 22:19:38 -0000	1.42.2.6
  @@ -308,7 +308,7 @@
   }
   
   /* handle RequestHeader and Header directive */
  -static const char *header_inout_cmd(hdr_inout inout, cmd_parms *cmd, void *indirconf,
  +static const char *header_inout_cmd(cmd_parms *cmd, void *indirconf,
                                 const char *action, const char *inhdr,
                                 const char *value, const char* envclause)
   {
  @@ -320,6 +320,7 @@
       server_rec *s = cmd->server;
       headers_conf *serverconf = ap_get_module_config(s->module_config,
                                                       &headers_module);
  +    hdr_inout inout = (hdr_inout)cmd->info;
   
       if (cmd->path) {
           new = (header_entry *) apr_array_push((hdr_in == inout) ? dirconf->fixup_in
: dirconf->fixup_out);
  @@ -364,9 +365,6 @@
   
       /* Handle the envclause on Header */
       if (envclause != NULL) {
  -        if (inout != hdr_out) {
  -            return "error: envclause (env=...) only valid on Header directive";
  -        }
           if (strncasecmp(envclause, "env=", 4) != 0) {
               return "error: envclause should be in the form env=envar";
           }
  @@ -386,7 +384,7 @@
       return parse_format_string(cmd->pool, new, value);
   }
   
  -/* Handle Header directive */
  +/* Handle all (xxx)Header directives */
   static const char *header_cmd(cmd_parms *cmd, void *indirconf,
                                 const char *args)
   {
  @@ -402,15 +400,7 @@
       val = *s ? ap_getword_conf(cmd->pool, &s) : NULL;
       envclause = *s ? ap_getword_conf(cmd->pool, &s) : NULL;
   
  -    return header_inout_cmd(hdr_out, cmd, indirconf, action, hdr, val, envclause);
  -}
  -
  -/* handle RequestHeader directive */
  -static const char *request_header_cmd(cmd_parms *cmd, void *indirconf,
  -                              const char *action, const char *inhdr,
  -                              const char *value)
  -{
  -    return header_inout_cmd(hdr_in, cmd, indirconf, action, inhdr, value, NULL);
  +    return header_inout_cmd(cmd, indirconf, action, hdr, val, envclause);
   }
   
   /*
  @@ -550,9 +540,9 @@
                                           
   static const command_rec headers_cmds[] =
   {
  -    AP_INIT_RAW_ARGS("Header", header_cmd, NULL, OR_FILEINFO,
  +    AP_INIT_RAW_ARGS("Header", header_cmd, (void *)hdr_out, OR_FILEINFO,
                      "an action, header and value followed by optional env clause"),
  -    AP_INIT_TAKE23("RequestHeader", request_header_cmd, NULL, OR_FILEINFO,
  +    AP_INIT_RAW_ARGS("RequestHeader", header_cmd, (void *)hdr_in, OR_FILEINFO,
                      "an action, header and value"),
       {NULL}
   };
  
  
  

Mime
View raw message