Hi all,

This patch updates the mod_headers docs in line with changes to the
headers module.

Regards,
Graham
-- 
-----------------------------------------
[EMAIL PROTECTED]                "There's a moon
                                        over Bourbon Street
                                                tonight..."
--- /home/minfrin/src/apache/pristine/httpd-2.0/docs/manual/mod/mod_headers.html Sat Dec 9 20:50:02 2000 +++ /opt/local/apache2/htdocs/manual/mod/mod_headers.html Sun May 20 03:22:38 2001 @@ -36,31 +36,34 @@ 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 HeaderOut.

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


-

Header directive

+

HeaderIn directive

Syntax: Header set|append|add +>Syntax: HeaderIn set|append|add header value
Syntax: Header unset header
+>Syntax: HeaderIn unset header
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 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 HeaderIn (and HeaderOut) 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 HeaderIn 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: +
+HeaderIn append MirrorID "mirror 12"
+HeaderIn unset MirrorID
+
+ +This way round, the MirrorID header is not set. If reversed, the MirrorID +header is set to "mirror 12". +

+ +The HeaderIn 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. +

+ +


+ +

HeaderOut directive

+Syntax: HeaderOut set|append|add + header value
+Syntax: HeaderOut 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 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 +HeaderIn:

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

    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 HeaderOut (like the HeaderIn) 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: +The HeaderOut directives are processed in the following order:

    1. main server
    2. virtual host @@ -128,8 +226,8 @@ Order is important. These two headers have a different effect if reversed:
      -Header append Author "John P. Doe"
      -Header unset Author
      +HeaderOut append Author "John P. Doe"
      +HeaderOut unset Author
       
      This way round, the Author header is not set. If reversed, the Author @@ -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.

      S/MIME Cryptographic Signature

Reply via email to