]> granicus.if.org Git - apache/commitdiff
document new features of setenvif and mod_negotiation.
authorAndré Malo <nd@apache.org>
Sat, 22 Feb 2003 22:20:21 +0000 (22:20 +0000)
committerAndré Malo <nd@apache.org>
Sat, 22 Feb 2003 22:20:21 +0000 (22:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98768 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/content-negotiation.html.en
docs/manual/content-negotiation.xml
docs/manual/env.html.en
docs/manual/env.xml
docs/manual/mod/mod_setenvif.html.en
docs/manual/mod/mod_setenvif.xml

index c42ce5f777972eb6855c588022a624e91c44092c..bbb5ffbdbb1e45c718d42acd25995c4b3212fbfe 100644 (file)
@@ -483,6 +483,19 @@ Negotiation</a></li>
     specification and to work effectively with properly configured
     clients.</p>
 
+    <p>In order to support advanced techniques (such as Cookies or
+    special URL-paths) to determine the user's preferred language,
+    since Apache 2.1 <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> recognizes
+    the <a href="env.html">environment variable</a>
+    <code>prefer-language</code>. If it exists and contains an
+    appropriate language tag, <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> will
+    try to select a matching variant. If there's no such variant,
+    the normal negotiation process applies.</p>
+
+    <div class="example"><h3>Example</h3><p><code>
+      SetEnvIf Cookie "language=(.+)" prefer-language=$1
+    </code></p></div>
+
 </div><div class="top"><a href="#page-header"><img alt="top" src="./images/up.gif" /></a></div>
 <div class="section">
 <h2><a name="extensions" id="extensions">Extensions to Transparent Content
index d5f287d890affb9202336dd7db49a545735b2b75..06a563b5dcdba65751942ede0879e657ff895168 100644 (file)
     This is necessary to maintain compliance with the HTTP/1.1
     specification and to work effectively with properly configured
     clients.</p>
+
+    <p>In order to support advanced techniques (such as Cookies or
+    special URL-paths) to determine the user's preferred language,
+    since Apache 2.1 <module>mod_negotiation</module> recognizes
+    the <a href="env.html">environment variable</a>
+    <code>prefer-language</code>. If it exists and contains an
+    appropriate language tag, <module>mod_negotiation</module> will
+    try to select a matching variant. If there's no such variant,
+    the normal negotiation process applies.</p>
+
+    <example><title>Example</title>
+      SetEnvIf Cookie "language=(.+)" prefer-language=$1
+    </example>
 </section>
 </section>
 
index 0d23152836a89a13dee837a4507752ce5045ea56..9d0dd31860c7405d8c699e460214bc8ae786e601 100644 (file)
         mechanisms to modify the way Apache behaves when talking to
         particular clients. To make these mechanisms as flexible as
         possible, they are invoked by defining environment variables,
-        typically with <code class="directive"><a href="./mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>,
-        though <code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code> and 
-        <code class="directive"><a href="./mod/mod_env.html#passenv">PassEnv</a></code> could also be used,
-        for example.</p>
+        typically with <code class="directive"><a href="./mod/mod_setenvif.html#browsermatch">BrowserMatch</a></code>, though <code class="directive"><a href="./mod/mod_env.html#setenv">SetEnv</a></code> and  <code class="directive"><a href="./mod/mod_env.html#passenv">PassEnv</a></code> could also be used, for example.</p>
     
     <h3><a name="downgrade" id="downgrade">downgrade-1.0</a></h3>
         
     <h3><a name="nokeepalive" id="nokeepalive">nokeepalive</a></h3>
         
     
-        <p>This disables <code class="directive"><a href="./mod/core.html#keepalive">KeepAlive</a></code> when set.</p>
+        <p>This disables <code class="directive"><a href="./mod/core.html#keepalive">KeepAlive</a></code>
+        when set.</p>
     
     
+
+    <h3><a name="prefer-language" id="prefer-language">prefer-language</a></h3>
+    
+        <p>This influences <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code>'s behaviour. If
+        it contains a language tag (such as <code>en</code>, <code>ja</code>
+        or <code>x-klingon</code>), <code class="module"><a href="./mod/mod_negotiation.html">mod_negotiation</a></code> tries
+        to deliver a variant with that language. If there's no such variant,
+        the normal <a href="content-negotiation.html">negotiation</a> process
+        applies.</p>
+    
+    
+
     <h3><a name="redirect-carefully" id="redirect-carefully">redirect-carefully</a></h3>
         
     
index 69256c75483397ecd89cd03819b6aaab83542f55..50ce966ac4a55b90c0242c2df741b3160b887bd1 100644 (file)
         mechanisms to modify the way Apache behaves when talking to
         particular clients. To make these mechanisms as flexible as
         possible, they are invoked by defining environment variables,
-        typically with <directive module="mod_setenvif">BrowserMatch</directive>,
-        though <directive module="mod_env">SetEnv</directive> and 
-        <directive module="mod_env">PassEnv</directive> could also be used,
-        for example.</p>
+        typically with <directive module="mod_setenvif"
+        >BrowserMatch</directive>, though <directive module="mod_env"
+        >SetEnv</directive> and  <directive module="mod_env"
+        >PassEnv</directive> could also be used, for example.</p>
     
     <section id="downgrade">
         <title>downgrade-1.0</title>
     <section id="nokeepalive">
         <title>nokeepalive</title>
     
-        <p>This disables <directive module="core">KeepAlive</directive> when set.</p>
+        <p>This disables <directive module="core">KeepAlive</directive>
+        when set.</p>
     
     </section>
+
+    <section id="prefer-language"><title>prefer-language</title>
+    
+        <p>This influences <module>mod_negotiation</module>'s behaviour. If
+        it contains a language tag (such as <code>en</code>, <code>ja</code>
+        or <code>x-klingon</code>), <module>mod_negotiation</module> tries
+        to deliver a variant with that language. If there's no such variant,
+        the normal <a href="content-negotiation.html">negotiation</a> process
+        applies.</p>
+    
+    </section>
+
     <section id="redirect-carefully">
         <title>redirect-carefully</title>
     
index 8f32d846fc9df2af5d62642ce597ae72137a234f..65a54071f2c2ab16d35ee452f179e96b0f5a2aac 100644 (file)
@@ -207,7 +207,10 @@ of</p>
     <p>In the first form, the value will be set to "1". The second
     will remove the given variable if already defined, and the
     third will set the variable to the literal value given by
-    <code><em>value</em></code>.</p>
+    <code><em>value</em></code>. Since version 2.1 Apache will
+    recognize occurrences of <code>$1</code>..<code>$9</code> within
+    <var>value</var> and replace them by parenthesized subexpressions
+    of <var>regex</var>.</p>
 
 <div class="example"><h3>Example:</h3><p><code>
 
index 3bc75e79e6ab9331042ef07192e3716a98e9032b..a81ff3db28a508b8120c8aeaad10113b24954ada 100644 (file)
@@ -189,7 +189,10 @@ of</p>
     <p>In the first form, the value will be set to "1". The second
     will remove the given variable if already defined, and the
     third will set the variable to the literal value given by
-    <code><em>value</em></code>.</p>
+    <code><em>value</em></code>. Since version 2.1 Apache will
+    recognize occurrences of <code>$1</code>..<code>$9</code> within
+    <var>value</var> and replace them by parenthesized subexpressions
+    of <var>regex</var>.</p>
 
 <example>
 <title>Example:</title>