summaryrefslogtreecommitdiff
path: root/docs/manual/mod/mod_headers.html.en
diff options
context:
space:
mode:
Diffstat (limited to 'docs/manual/mod/mod_headers.html.en')
-rw-r--r--docs/manual/mod/mod_headers.html.en107
1 files changed, 84 insertions, 23 deletions
diff --git a/docs/manual/mod/mod_headers.html.en b/docs/manual/mod/mod_headers.html.en
index 28a9c6ca..9e4cb8cd 100644
--- a/docs/manual/mod/mod_headers.html.en
+++ b/docs/manual/mod/mod_headers.html.en
@@ -29,9 +29,7 @@
headers</td></tr>
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
<tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>headers_module</td></tr>
-<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_headers.c</td></tr>
-<tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td><code class="directive"><a href="#requestheader">RequestHeader</a></code>
-is available only in Apache 2.0</td></tr></table>
+<tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_headers.c</td></tr></table>
<h3>Summary</h3>
<p>This module provides directives to control and modify HTTP
@@ -167,18 +165,49 @@ is available only in Apache 2.0</td></tr></table>
RequestHeader edit Destination ^https: http: early
</code></p></div>
</li>
+
+ <li>
+ Set the same header value under multiple non-exclusive conditions,
+ but do not duplicate the value in the final header.
+ If all of the following conditions applied to a request (i.e.,
+ if the <code>CGI</code>, <code>NO_CACHE</code> and
+ <code>NO_STORE</code> environment variables all existed for the
+ request):
+
+ <div class="example"><p><code>
+ Header merge Cache-Control no-cache env=CGI<br />
+ Header merge Cache-Control no-cache env=NO_CACHE<br />
+ Header merge Cache-Control no-store env=NO_STORE
+ </code></p></div>
+
+ <p>then the response would contain the following header:</p>
+
+ <div class="example"><p><code>
+ Cache-Control: no-cache, no-store
+ </code></p></div>
+
+ <p>If <code>append</code> was used instead of <code>merge</code>,
+ then the response would contain the following header:</p>
+
+ <div class="example"><p><code>
+ Cache-Control: no-cache, no-cache, no-store
+ </code></p></div>
+ </li>
</ol>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="Header" id="Header">Header</a> <a name="header" id="header">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure HTTP response headers</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Header [<var>condition</var>] set|append|add|unset|echo|edit
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>Header [<var>condition</var>] set|append|merge|add|unset|echo|edit
<var>header</var> [<var>value</var>] [early|env=[!]<var>variable</var>]</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_headers</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The <code>merge</code> argument is available in version
+2.2.9 and later. The <code>edit</code> argument is available in version
+2.2.4 and later.</td></tr>
</table>
<p>This directive can replace, merge or remove HTTP response
headers. The header is modified just after the content handler
@@ -206,12 +235,23 @@ is available only in Apache 2.0</td></tr></table>
header it is separated from the existing header with a comma.
This is the HTTP standard way of giving a header multiple values.</dd>
+ <dt><code>merge</code></dt>
+ <dd>The response header is appended to any existing header of
+ the same name, unless the value to be appended already appears in the
+ header's comma-delimited list of values. 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.
+ Values are compared in a case sensitive manner, and after
+ all format specifiers have been processed. Values in double quotes
+ are considered different from otherwise identical unquoted values.
+ <em>Available in version 2.2.9 and later.</em></dd>
+
<dt><code>add</code></dt>
<dd>The response 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 <code>set</code> or
- <code>append</code> should be used instead.</dd>
+ unforeseen consequences, and in general <code>set</code>,
+ <code>append</code> or <code>merge</code> should be used instead.</dd>
<dt><code>unset</code></dt>
<dd>The response header of this name is removed, if it exists.
@@ -225,22 +265,26 @@ is available only in Apache 2.0</td></tr></table>
<var>value</var> must be omitted.</dd>
<dt><code>edit</code></dt>
- <dd>If this request header exists, its value is transformed according
- to a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
- search-and-replace. The <var>value</var> argument is a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>, and the <var>replacement</var>
- is a replacement string, which may contain backreferences.</dd>
+ <dd>If this request header exists, its value is transformed
+ according to a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
+ search-and-replace. The <var>value</var> argument is
+ a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>, and
+ the <var>replacement</var> is a replacement string, which may
+ contain backreferences. <em>Available in version 2.2.4 and
+ later.</em></dd>
</dl>
<p>This argument is followed by a <var>header</var> name, which
can include the final colon, but it is not required. Case is
- ignored for <code>set</code>, <code>append</code>, <code>add</code>,
- <code>unset</code>, and <code>edit</code>.
+ ignored for <code>set</code>, <code>append</code>, <code>merge</code>,
+ <code>add</code>, <code>unset</code> and <code>edit</code>.
The <var>header</var> name for <code>echo</code>
is case sensitive and may be a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular
expression</a>.</p>
- <p>For <code>set</code>, <code>append</code> and <code>add</code> a
- <var>value</var> is specified as the third argument. If <var>value</var>
+ <p>For <code>set</code>, <code>append</code>, <code>merge</code> and
+ <code>add</code> a <var>value</var> is specified as the third argument.
+ If <var>value</var>
contains spaces, it should be surrounded by double quotes.
<var>value</var> may be a character string, a string containing format
specifiers or a combination of both. The following format specifiers
@@ -300,12 +344,15 @@ is available only in Apache 2.0</td></tr></table>
<div class="directive-section"><h2><a name="RequestHeader" id="RequestHeader">RequestHeader</a> <a name="requestheader" id="requestheader">Directive</a></h2>
<table class="directive">
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Configure HTTP request headers</td></tr>
-<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RequestHeader set|append|add|unset|edit <var>header</var>
+<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>RequestHeader set|append|merge|add|unset|edit <var>header</var>
[<var>value</var>] [<var>replacement</var>] [early|env=[!]<var>variable</var>]</code></td></tr>
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">Override:</a></th><td>FileInfo</td></tr>
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_headers</td></tr>
+<tr><th><a href="directive-dict.html#Compatibility">Compatibility:</a></th><td>The <code>merge</code> argument is available in version
+2.2.9 and later. The <code>edit</code> argument is available in version
+2.2.4 and later.</td></tr>
</table>
<p>This directive can replace, merge, change or remove HTTP request
headers. The header is modified just before the content handler
@@ -325,12 +372,23 @@ is available only in Apache 2.0</td></tr></table>
is the HTTP standard way of giving a header multiple
values.</dd>
+ <dt><code>merge</code></dt>
+ <dd>The response header is appended to any existing header of
+ the same name, unless the value to be appended already appears in the
+ existing header's comma-delimited list of values. 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. Values are compared in a case sensitive manner, and after
+ all format specifiers have been processed. Values in double quotes
+ are considered different from otherwise identical unquoted values.
+ <em>Available in version 2.2.9 and later.</em></dd>
+
<dt><code>add</code></dt>
<dd>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 <code>set</code> or
- <code>append</code> should be used instead.</dd>
+ unforeseen consequences, and in general <code>set</code>,
+ <code>append</code> or <code>merge</code> should be used instead.</dd>
<dt><code>unset</code></dt>
<dd>The request header of this name is removed, if it exists. If
@@ -338,15 +396,18 @@ is available only in Apache 2.0</td></tr></table>
<var>value</var> must be omitted.</dd>
<dt><code>edit</code></dt>
- <dd>If this request header exists, its value is transformed according
- to a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
- search-and-replace. The <var>value</var> argument is a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>, and the <var>replacement</var>
- is a replacement string, which may contain backreferences.</dd>
+ <dd>If this request header exists, its value is transformed
+ according to a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>
+ search-and-replace. The <var>value</var> argument is
+ a <a class="glossarylink" href="../glossary.html#regex" title="see glossary">regular expression</a>, and
+ the <var>replacement</var> is a replacement string, which may
+ contain backreferences. <em>Available in version 2.2.4 and
+ later</em>.</dd>
</dl>
<p>This argument is followed by a header name, which can
include the final colon, but it is not required. Case is
- ignored. For <code>set</code>, <code>append</code> and
+ ignored. For <code>set</code>, <code>append</code>, <code>merge</code> and
<code>add</code> a <var>value</var> is given as the third argument. If a
<var>value</var> contains spaces, it should be surrounded by double
quotes. For <code>unset</code>, no <var>value</var> should be given.
@@ -382,6 +443,6 @@ is available only in Apache 2.0</td></tr></table>
<a href="../ja/mod/mod_headers.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
<a href="../ko/mod/mod_headers.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a></p>
</div><div id="footer">
-<p class="apache">Copyright 2007 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
+<p class="apache">Copyright 2008 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
<p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
</body></html> \ No newline at end of file