From: Stefan Fritsch Date: Mon, 29 Oct 2012 20:39:05 +0000 (+0000) Subject: Backport r1403476: X-Git-Tag: 2.4.4~462 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7528b97154f0402aa5ff008ceff7a96c927c493a;p=apache Backport r1403476: 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 --- diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 10f0d749e8..7b1f6d6626 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -55,6 +55,10 @@ Grammar in Backus-Naur Form notation

Backus-Naur Form (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 expr. However, a few directives + like LogMessage accept expressions + that evaluate to a string value. For those, the starting boint in the BNF is code.

@@ -135,7 +139,10 @@ listfunction ::= listfuncname "(" word ")"
 
     

The following variables provide the values of the named HTTP request headers. The values of other headers can be obtained with the - req function.

+ req function. 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.

@@ -425,7 +432,8 @@ listfunction ::= listfuncname "(" word ")" - + @@ -457,6 +465,11 @@ listfunction ::= listfuncname "(" word ")"

The functions marked as "restricted" are not available in some modules like mod_include.

+

When the functions req or http 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.

+

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 -in operator. diff --git a/docs/manual/mod/mod_log_config.xml b/docs/manual/mod/mod_log_config.xml index d2f1fc71dc..feda90c371 100644 --- a/docs/manual/mod/mod_log_config.xml +++ b/docs/manual/mod/mod_log_config.xml @@ -461,7 +461,8 @@ CustomLog logs/access_log "%h %l %u %t \"%r\" %>s %b" environment. Alternatively, the condition can be expressed as arbitrary boolean expression. If the condition is not satisfied, the request - will not be logged.

+ will not be logged. References to HTTP headers in the expression + will not cause the header names to be added to the Vary header.

Environment variables can be set on a per-request basis using the mod_setenvif diff --git a/docs/manual/mod/mod_log_debug.xml b/docs/manual/mod/mod_log_debug.xml index 1556b664ed..f1517449a2 100644 --- a/docs/manual/mod/mod_log_debug.xml +++ b/docs/manual/mod/mod_log_debug.xml @@ -93,8 +93,9 @@

This directive causes a user defined message to be logged to the error log. The message can use variables and functions from the - ap_expr syntax. The messages are logged at - loglevel info.

+ ap_expr syntax. References to HTTP headers + will not cause header names to be added to the Vary header. The + messages are logged at loglevel info.

The hook specifies before which phase of request procesing the message will be logged. The following hooks are supported:

@@ -122,7 +123,8 @@

The optional expression allows to restrict the message if a condition is met. The details of the expression syntax are described in - the ap_expr documentation.

+ the ap_expr documentation. References to HTTP + headers will not cause the header names to be added to the Vary header.

diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml index edfdd2e9c5..0479e5e721 100644 --- a/docs/manual/mod/mod_rewrite.xml +++ b/docs/manual/mod/mod_rewrite.xml @@ -567,9 +567,11 @@ Alias /myapp /opt/myapp-1.2.3 -

If the TestString has the special value expr, the - CondPattern will be treated as an - ap_expr.

+

If the TestString has the special value expr, + the CondPattern will be treated as an + ap_expr. HTTP headers referenced in the + expression will be added to the Vary header if the novary + flag is not given.

Other things you should be aware of:

NameDescriptionRestricted
req, httpGet HTTP request header
Get HTTP request header; header names may be added to the Vary + header, see below
resp Get HTTP response header
reqenv