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
+
+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:
+
+- main server
+
- virtual host
+
- <Directory> sections and .htaccess
+
- <Location>
+
- <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.
+
+
+
+
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 @@ For unset, no value should be given.
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 @@ header is set to "John P. Doe".
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.
--
2.40.0