Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 90808 invoked by uid 500); 20 May 2001 15:54:22 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 90797 invoked by uid 500); 20 May 2001 15:54:22 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Date: 20 May 2001 15:54:21 -0000 Message-ID: <20010520155421.90793.qmail@apache.org> From: minfrin@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/docs/manual/mod mod_headers.html minfrin 01/05/20 08:54:21 Modified: docs/manual/mod mod_headers.html Log: Updated mod_headers documentation to coincide with addition of RequestHeader directive. Revision Changes Path 1.14 +109 -12 httpd-2.0/docs/manual/mod/mod_headers.html Index: mod_headers.html =================================================================== RCS file: /home/cvs/httpd-2.0/docs/manual/mod/mod_headers.html,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- mod_headers.html 2000/12/09 19:50:02 1.13 +++ mod_headers.html 2001/05/20 15:54:21 1.14 @@ -36,21 +36,117 @@ Compatibility: Available in Apache 1.2 and later. +>Compatibility: Available in Apache 1.2 and later. In +Apache 2.0 the Header directive was replaced with Header.

Summary

-This module provides a directive to control the sending of HTTP -headers. Headers can be merged, replaced or removed. +This module provides directives to control and modify HTTP +request and response headers. Headers can be merged, +replaced or removed.

Directives


+

RequestHeader directive

+Syntax: RequestHeader set|append|add + header value
+Syntax: RequestHeader unset header
+Context: server config, virtual host, access.conf, + .htaccess
+Override: FileInfo
+Status: Extension
+Module: mod_header

+ +This directive can replace, merge or remove HTTP request headers. The header +is modified just before the content handler is run, allowing incoming +headers to be modified. The action it performs is determined by the first +argument. This can be one of the following values: + +

    +
  • set
    + The request header is set, replacing any previous header with this name + +
  • append
    + The request header is appended to any existing header of the same + name. When a new value is merged onto an existing header it is + separated from the existing header with a comma. This is the HTTP standard + way of giving a header multiple values. + +
  • add
    + The request header is added to the existing set of headers, even if + this header already exists. This can result in two (or more) headers + having the same name. This can lead to unforeseen consequences, and in + general "append" should be used instead. + +
  • unset
    + The request header of this name is removed, if it exists. If there are + multiple headers of the same name, all will be removed. +
+ +This argument is followed by a header name, which can include the +final colon, but it is not required. Case is ignored. For +add, append and set a value is given as the third argument. If this +value contains spaces, it should be surrounded by double quotes. +For unset, no value should be given. + +

Order of Processing

+ +The RequestHeader (and Header) directives can occur almost anywhere within +the server configuration. It is valid in the main server config and virtual +host sections, inside <Directory>, <Location> and <Files> +sections, and within .htaccess files. +

+The RequestHeader directives are processed in the following order: +

    +
  1. main server +
  2. virtual host +
  3. <Directory> sections and .htaccess +
  4. <Location> +
  5. <Files> +
+ +Order is important. These two headers have a different effect if reversed: +
  +RequestHeader append MirrorID "mirror 12"
  +RequestHeader unset MirrorID
  +
+ +This way round, the MirrorID header is not set. If reversed, the MirrorID +header is set to "mirror 12". +

+ +The RequestHeader directive is processed just before the request is run +by its handler in the fixup phase. This should allow headers generated by +the browser, or by Apache input filters to be overridden or modified. +

+ +


+

Header directive

Module: mod_header

-This directive can replace, merge or remove HTTP response headers. The -action it performs is determined by the first argument. This can be one -of the following values: +This directive can replace, merge or remove HTTP response headers. The header +is modified just after the content handler and output filters are run, +allowing outgoing headers to be modified. The action it performs is determined +by the first argument. This can be one of the following values, as with +RequestHeader:

  • set
    @@ -112,9 +210,9 @@

    Order of Processing

    -The Header directive can occur almost anywhere within the server -configuration. It is valid in the main server config and virtual host -sections, inside <Directory>, <Location> and <Files> +The Header (like the RequestHeader) directives can occur almost anywhere within +the server configuration. It is valid in the main server config and virtual +host sections, inside <Directory>, <Location> and <Files> sections, and within .htaccess files.

    The Header directives are processed in the following order: @@ -137,9 +235,8 @@

    The Header directives are processed just before the response is sent -by its handler. These means that some headers that are added just -before the response is sent cannot be unset or overridden. This -includes headers such as "Date" and "Server". +to the network. These means that it is possible to set and/or override +most headers, except for those headers added by the header filter.