<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>
<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>
<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>
<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.
<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>
<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>
</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>