From 5ebd4c2b686176a9e52348ccb9926ff0fcb19ebb Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 20 May 2001 15:54:21 +0000 Subject: [PATCH] Updated mod_headers documentation to coincide with addition of RequestHeader directive. PR: Obtained from: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89181 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/mod/mod_headers.html | 121 ++++++++++++++++++++++++++++--- 1 file changed, 109 insertions(+), 12 deletions(-) diff --git a/docs/manual/mod/mod_headers.html b/docs/manual/mod/mod_headers.html index da1d7e19bc..18d0433e82 100644 --- a/docs/manual/mod/mod_headers.html +++ b/docs/manual/mod/mod_headers.html @@ -36,21 +36,117 @@ REL="Help" 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: + +

+ +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: