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, 18 Apr 2004 19:55:20 GMT
nd          2004/04/18 12:55:20

  Modified:    .        CHANGES
               modules/metadata mod_headers.c
  Log:
  allow env clauses also for 'echo' and 'unset'
  
  Revision  Changes    Path
  1.1462    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1461
  retrieving revision 1.1462
  diff -u -u -r1.1461 -r1.1462
  --- CHANGES	18 Apr 2004 19:42:34 -0000	1.1461
  +++ CHANGES	18 Apr 2004 19:55:20 -0000	1.1462
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_headers: Allow env clauses also for 'echo' and 'unset' actions.
  +     [André Malo]
  +
     *) mod_headers: Allow 'echo' also for ErrorHeaders.  [André Malo]
   
     *) mod_headers no longer crashes if an empty header value should
  
  
  
  1.58      +15 -5     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.57
  retrieving revision 1.58
  diff -u -u -r1.57 -r1.58
  --- mod_headers.c	18 Apr 2004 19:42:34 -0000	1.57
  +++ mod_headers.c	18 Apr 2004 19:55:20 -0000	1.58
  @@ -386,15 +386,25 @@
                  "'echo'.";
   
       if (new->action == hdr_unset) {
  -        if (value)
  -            return "header unset takes two arguments";
  +        if (value) {
  +            if (envclause) {
  +                return "header unset takes two arguments";
  +            }
  +            envclause = value;
  +            value = NULL;
  +        }
       }
       else if (new->action == hdr_echo) {
           regex_t *regex;
   
  -        if (value)
  -            return "Header echo takes two arguments";
  -        else if (cmd->info != &hdr_out && cmd->info != &hdr_err)
  +        if (value) {
  +            if (envclause) {
  +                return "Header echo takes two arguments";
  +            }
  +            envclause = value;
  +            value = NULL;
  +        }
  +        if (cmd->info != &hdr_out && cmd->info != &hdr_err)
               return "Header echo only valid on Header and ErrorHeader "
                      "directives";
           else {
  
  
  

Mime
View raw message