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 20:26:07 GMT
nd          2004/04/18 13:26:07

  Modified:    .        CHANGES
               modules/metadata mod_headers.c
  Log:
  allow %% to represent a literal %.
  
  Revision  Changes    Path
  1.1463    +3 -0      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.1462
  retrieving revision 1.1463
  diff -u -u -r1.1462 -r1.1463
  --- CHANGES	18 Apr 2004 19:55:20 -0000	1.1462
  +++ CHANGES	18 Apr 2004 20:26:06 -0000	1.1463
  @@ -2,6 +2,9 @@
   
     [Remove entries to the current 2.0 section below, when backported]
   
  +  *) mod_headers: Allow %% in header values to represent a literal %.
  +     [André Malo]
  +
     *) mod_headers: Allow env clauses also for 'echo' and 'unset' actions.
        [André Malo]
   
  
  
  
  1.59      +10 -2     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.58
  retrieving revision 1.59
  diff -u -u -r1.58 -r1.59
  --- mod_headers.c	18 Apr 2004 19:55:20 -0000	1.58
  +++ mod_headers.c	18 Apr 2004 20:26:07 -0000	1.59
  @@ -299,6 +299,15 @@
           return parse_misc_string(p, tag, sa);
       }
       s++; /* skip the % */
  +
  +    /* Pass through %% as % */
  +    if (*s == '%') {
  +        tag->func = constant_item;
  +        tag->arg = "%";
  +        *sa = ++s;
  +        return NULL;
  +    }
  +
       tag->arg = '\0';
       /* grab the argument if there is one */
       if (*s == '{') {
  @@ -312,8 +321,7 @@
           char dummy[2];
           dummy[0] = s[-1];
           dummy[1] = '\0';
  -        return apr_pstrcat(p, "Unrecognized Header or RequestHeader directive %",
  -                           dummy, NULL);
  +        return apr_pstrcat(p, "Unrecognized header format %", dummy, NULL);
       }
       tag->func = tag_handler;
   
  
  
  

Mime
View raw message