httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@apache.org
Subject cvs commit: httpd-2.0/modules/metadata mod_headers.c
Date Sun, 20 May 2001 06:58:07 GMT
fielding    01/05/19 23:58:07

  Modified:    .        CHANGES
               modules/metadata mod_headers.c
  Log:
  Change directive HeaderOut back to Header and HeaderIn to RequestHeader.
  
  Revision  Changes    Path
  1.206     +6 -5      httpd-2.0/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/CHANGES,v
  retrieving revision 1.205
  retrieving revision 1.206
  diff -u -r1.205 -r1.206
  --- CHANGES	2001/05/19 20:12:02	1.205
  +++ CHANGES	2001/05/20 06:58:06	1.206
  @@ -1,9 +1,10 @@
  -Changes with Apache 2.0.18-dev
  +Changes with Apache 2.0.19-dev
  +
     *) Reimplement mod_headers as an output filter. mod_headers can now
  -     add custom headers to inbound requests using the HeaderIn directive
  -     and to responses using the HeaderOut directive. The Header
  -     directive has been deprecated in favor of the HeaderOut directive.
  -     [Graham Leggett]
  +     add custom headers to inbound requests using the RequestHeader directive
  +     and to responses using the same old Header directive.  [Graham Leggett]
  +
  +Changes with Apache 2.0.18
   
     *) Fix command-line processing so that if a bad argument is specified
        Apache will exit.  [Jeff Trawick]
  
  
  
  1.23      +19 -27    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.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_headers.c	2001/05/19 20:12:05	1.22
  +++ mod_headers.c	2001/05/20 06:58:07	1.23
  @@ -60,13 +60,15 @@
    * mod_headers.c: Add/append/remove HTTP response headers
    *     Written by Paul Sutton, paul@ukweb.com, 1 Oct 1996
    *
  - * HeaderIn and HeaderOut can be used to add/replace/remove HTTP headers.
  + * The Header directive can be used to add/replace/remove HTTP headers
  + * within the response message.  The RequestHeader directive can be used
  + * to add/replace/remove HTTP headers before a request message is processed.
    * Valid in both per-server and per-dir configurations.
    *
    * Syntax is:
    *
  - *   HeaderIn action header value
  - *   HeaderOut action header value
  + *   Header action header value
  + *   RequestHeader action header value
    *
    * Where action is one of:
    *     set    - set this header, replacing any old value
  @@ -78,8 +80,8 @@
    * Where action is unset, the third argument (value) should not be given.
    * The header name can include the colon, or not.
    *
  - * The Header(In|Out) directive can only be used where allowed by the
  - * FileInfo override.
  + * The Header and RequestHeader directives can only be used where allowed
  + * by the FileInfo override.
    *
    * When the request is processed, the header directives are processed in
    * this order: firstly, the main server, then the virtual server handling
  @@ -90,16 +92,16 @@
    * the following two directives have different effect if applied in
    * the reverse order:
    *
  - *   HeaderOut append Author "John P. Doe"
  - *   HeaderOut unset Author
  + *   Header append Author "John P. Doe"
  + *   Header unset Author
    *
    * Examples:
    *
    *  To set the "Author" header, use
  - *     HeaderOut add Author "John P. Doe"
  + *     Header add Author "John P. Doe"
    *
    *  To remove a header:
  - *     HeaderOut unset Author
  + *     Header unset Author
    *
    */
   
  @@ -124,8 +126,8 @@
   } hdr_actions;
   
   typedef enum {
  -    hdr_in = 0,                 /* HeaderIn */
  -    hdr_out = 1,                /* HeaderOut */
  +    hdr_in = 0,                 /* RequestHeader */
  +    hdr_out = 1,                /* Header */
   } hdr_inout;
   
   typedef struct {
  @@ -173,7 +175,7 @@
   }
   
   
  -/* handle HeaderIn and HeaderOut directive */
  +/* handle RequestHeader and Header directive */
   static const char *header_inout_cmd(hdr_inout inout, cmd_parms *cmd, void *indirconf,
                                 const char *action, const char *inhdr,
                                 const char *value)
  @@ -206,10 +208,10 @@
   
       if (new->action == hdr_unset) {
           if (value)
  -            return "Header(In|Out) unset takes two arguments";
  +            return "header unset takes two arguments";
       }
       else if (!value)
  -        return "Header(In|Out) requires three arguments";
  +        return "header requires three arguments";
   
       if ((colon = strchr(hdr, ':')))
           *colon = '\0';
  @@ -220,23 +222,15 @@
       return NULL;
   }
   
  -/* handle deprecated Header directive */
  +/* handle Header directive */
   static const char *header_cmd(cmd_parms *cmd, void *indirconf,
                                 const char *action, const char *inhdr,
                                 const char *value)
   {
  -    return "The Header directive has been deprecated. Use HeaderOut instead.";
  -}
  -
  -/* handle HeaderOut directive */
  -static const char *header_out_cmd(cmd_parms *cmd, void *indirconf,
  -                              const char *action, const char *inhdr,
  -                              const char *value)
  -{
       return header_inout_cmd(hdr_out, cmd, indirconf, action, inhdr, value);
   }
   
  -/* handle HeaderIn directive */
  +/* handle RequestHeader directive */
   static const char *header_in_cmd(cmd_parms *cmd, void *indirconf,
                                 const char *action, const char *inhdr,
                                 const char *value)
  @@ -322,10 +316,8 @@
   static const command_rec headers_cmds[] =
   {
       AP_INIT_TAKE23("Header", header_cmd, NULL, OR_FILEINFO,
  -                   "deprecated, use HeaderOut instead"),
  -    AP_INIT_TAKE23("HeaderIn", header_in_cmd, NULL, OR_FILEINFO,
                      "an action, header and value"),
  -    AP_INIT_TAKE23("HeaderOut", header_out_cmd, NULL, OR_FILEINFO,
  +    AP_INIT_TAKE23("RequestHeader", header_in_cmd, NULL, OR_FILEINFO,
                      "an action, header and value"),
       {NULL}
   };
  
  
  

Mime
View raw message