]> granicus.if.org Git - apache/commitdiff
Backport r1403476:
authorStefan Fritsch <sf@apache.org>
Mon, 29 Oct 2012 20:39:05 +0000 (20:39 +0000)
committerStefan Fritsch <sf@apache.org>
Mon, 29 Oct 2012 20:39:05 +0000 (20:39 +0000)
Mention string-valued expression in the BNF.
Clarify when header names are added to the Vary header.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1403486 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/expr.xml
docs/manual/mod/mod_log_config.xml
docs/manual/mod/mod_log_debug.xml
docs/manual/mod/mod_rewrite.xml

index 10f0d749e89781620e6c70eabf95af09ea50e3ed..7b1f6d6626a77ea7fff3b5ddad51e20e6c5d41e2 100644 (file)
     <title>Grammar in Backus-Naur Form notation</title>
       <p><a href="http://en.wikipedia.org/wiki/Backus%E2%80%93Naur_Form">Backus-Naur Form</a> (BNF) is a notation
       technique for context-free grammars, often used to describe the syntax of languages used in computing.
+      In most cases, expressions are used to express boolean values.
+      For these, the starting boint in the BNF is <code>expr</code>. However, a few directives
+      like <directive module="mod_log_debug">LogMessage</directive> accept expressions
+      that evaluate to a string value. For those, the starting boint in the BNF is <code>code</code>.
       </p>
 <blockquote>
 <pre>
@@ -135,7 +139,10 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
 
     <p>The following variables provide the values of the named HTTP request
     headers. The values of other headers can be obtained with the
-    <code>req</code> <a href="#functions">function</a>.</p>
+    <code>req</code> <a href="#functions">function</a>. Using these
+    variables may cause the header name to be added to the Vary
+    header of the HTTP response, except where otherwise noted for the
+    directive accepting the expression.</p>
 
     <table border="1" style="zebra">
     <columnspec><column width="1"/></columnspec>
@@ -425,7 +432,8 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
 
     <tr><th>Name</th><th>Description</th><th>Restricted</th></tr>
     <tr><td><code>req</code>, <code>http</code></td>
-        <td>Get HTTP request header</td><td></td></tr>
+        <td>Get HTTP request header; header names may be added to the Vary
+            header, see below</td><td></td></tr>
     <tr><td><code>resp</code></td>
         <td>Get HTTP response header</td><td></td></tr>
     <tr><td><code>reqenv</code></td>
@@ -457,6 +465,11 @@ listfunction ::= listfuncname "<strong>(</strong>" word "<strong>)</strong>"
     <p>The functions marked as "restricted" are not available in some modules
     like <module>mod_include</module>.</p>
 
+    <p>When the functions <code>req</code> or <code>http</code> are used,
+    the header name will automatically be added to the Vary header of the
+    HTTP response, except where otherwise noted for the directive accepting
+    the expression.</p>
+
     <p>In addition to string-valued functions, there are also list-valued functions which
     take one string as argument and return a wordlist, i.e. a list of strings. The wordlist
     can be used with the special <code>-in</code> operator.
index d2f1fc71dcf8e988a86b2f9312fa7f6e0dbd1cdf..feda90c37192f7a875cfaecf88273dbf28a53c8b 100644 (file)
@@ -461,7 +461,8 @@ CustomLog logs/access_log "%h %l %u %t \"%r\" %&gt;s %b"
     <a href="../env.html">environment</a>. Alternatively, the condition
     can be expressed as arbitrary boolean <a href="../expr.html"
     >expression</a>. If the condition is not satisfied, the request
-    will not be logged.</p>
+    will not be logged. References to HTTP headers  in the expression
+    will not cause the header names to be added to the Vary header.</p>
 
     <p>Environment variables can be set on a per-request
     basis using the <module>mod_setenvif</module>
index 1556b664edfceada6d46aec6c803d31e041231bf..f1517449a28353b78f739b94c37c924d71d410e9 100644 (file)
@@ -93,8 +93,9 @@
 <usage>
     <p>This directive causes a user defined message to be logged to the
     error log. The message can use variables and functions from the
-    <a href="../expr.html">ap_expr syntax</a>. The messages are logged at
-    loglevel info.</p>
+    <a href="../expr.html">ap_expr syntax</a>. References to HTTP headers
+    will not cause header names to be added to the Vary header. The
+    messages are logged at loglevel info.</p>
 
     <p>The hook specifies before which phase of request procesing the message
     will be logged. The following hooks are supported:</p>
 
     <p>The optional expression allows to restrict the message if a
     condition is met. The details of the expression syntax are described in
-    the <a href="../expr.html">ap_expr documentation</a>.</p>
+    the <a href="../expr.html">ap_expr documentation</a>. References to HTTP
+    headers will not cause the header names to be added to the Vary header.</p>
 
 </usage>
 
index edfdd2e9c542f93d22be2ae16feb0158cbfddf50..0479e5e721f1324aed1eb11bf4e8233ae20b4223 100644 (file)
@@ -567,9 +567,11 @@ Alias /myapp /opt/myapp-1.2.3
         </li>
       </ul>
 
-      <p>If the <em>TestString</em> has the special value <code>expr</code>, the
-      <em>CondPattern</em> will be treated as an
-      <a href="../expr.html">ap_expr</a>.</p>
+      <p>If the <em>TestString</em> has the special value <code>expr</code>,
+      the <em>CondPattern</em> will be treated as an
+      <a href="../expr.html">ap_expr</a>. HTTP headers referenced in the
+      expression will be added to the Vary header if the <code>novary</code>
+      flag is not given.</p>
 
       <p>Other things you should be aware of:</p>