]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Add a description of the env= optional syntax, as per issue #27951
authorRich Bowen <rbowen@apache.org>
Sat, 11 Aug 2007 12:15:08 +0000 (12:15 +0000)
committerRich Bowen <rbowen@apache.org>
Sat, 11 Aug 2007 12:15:08 +0000 (12:15 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x@564905 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_headers.html.en
docs/manual/mod/mod_headers.xml

index 044f111ad6680dc117f28d3c8df7e41476f82a2d..c9eb0859bfe596d155f3ca625a203d3457bdbc9a 100644 (file)
@@ -256,7 +256,7 @@ later</td></tr>
 <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 <var>header</var>
-[<var>value</var>]</code></td></tr>
+[<var>value</var> [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>
@@ -299,6 +299,16 @@ later</td></tr>
     <var>value</var> contains spaces, it should be surrounded by double
     quotes. For unset, no <var>value</var> should be given.</p>
 
+    <p>When the <code class="directive">RequestHeader</code> directive is used with the
+    <code>add</code>, <code>append</code>, or <code>set</code>
+    argument, a fourth argument may be used to specify conditions
+    under which the action will be taken. If the <a href="../env.html">environment variable</a> specified in the
+    <code>env=...</code> argument exists (or if the environment
+    variable does not exist and <code>env=!...</code> is specified)
+    then the action specified by the <code class="directive">RequestHeader</code> directive
+    will take effect. Otherwise, the directive will have no effect
+    on the request.</p>
+
     <p>The <code class="directive">RequestHeader</code> 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
index af5f24fddb7b1a32c06e7dd1b5cb235d53efd1f3..37363b5bdaf38243c03505e57730d9eca1e314ac 100644 (file)
@@ -142,7 +142,7 @@ is available only in Apache 2.0</compatibility>
 <name>RequestHeader</name>
 <description>Configure HTTP request headers</description>
 <syntax>RequestHeader set|append|add|unset <var>header</var>
-[<var>value</var>]</syntax>
+[<var>value</var> [env=[!]<var>variable</var>]]</syntax>
 <contextlist><context>server config</context><context>virtual host</context>
 <context>directory</context><context>.htaccess</context></contextlist>
 <override>FileInfo</override>
@@ -185,6 +185,17 @@ is available only in Apache 2.0</compatibility>
     <var>value</var> contains spaces, it should be surrounded by double
     quotes. For unset, no <var>value</var> should be given.</p>
 
+    <p>When the <directive>RequestHeader</directive> directive is used with the
+    <code>add</code>, <code>append</code>, or <code>set</code>
+    argument, a fourth argument may be used to specify conditions
+    under which the action will be taken. If the <a
+    href="../env.html">environment variable</a> specified in the
+    <code>env=...</code> argument exists (or if the environment
+    variable does not exist and <code>env=!...</code> is specified)
+    then the action specified by the <directive>RequestHeader</directive> directive
+    will take effect. Otherwise, the directive will have no effect
+    on the request.</p>
+
     <p>The <directive>RequestHeader</directive> 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