From 1cfdc4be6befec0a65e58003d0510015d4e36d0a Mon Sep 17 00:00:00 2001
From: Andre Malo Historically, there are several syntax variants for expressions used to express
- a condition in the different modules of the Apache HTTP Server.
- There is some ongoing effort to only use a single variant, called ap_expr,
- for all configuration directives.
- This document describes the ap_expr expression parser.
+ Historically, there are several syntax variants for expressions
+ used to express a condition in the different modules of the Apache
+ HTTP Server. There is some ongoing effort to only use a single
+ variant, called ap_expr, for all configuration directives.
+ This document describes the ap_expr expression parser.
The ap_expr expression is intended to replace most other
- expression variants in HTTPD. For example, the deprecated
-
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 point in the BNF is expr. However, a few directives
- like string.
+
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 point in the BNF is expr.
+ However, a few directives like string.
@@ -251,8 +254,9 @@ listfunction ::= listfuncname "(" word ")"
The DocumentRoot of
the current vhost
AUTH_TYPE
- The configured AuthType
- (e.g. "basic")
+ The configured AuthType (e.g.
+ "basic")
CONTENT_TYPE
The content type of the response
HANDLER
@@ -301,14 +305,16 @@ listfunction ::= listfuncname "(" word ")"
The day of the week (starting with 0
for Sunday)
TIME
- The date and time in the format 20101231235959
+ The date and time in the format
+ 20101231235959
SERVER_SOFTWARE
The server version string
API_VERSION
The date of the API version (module magic number)
- Some modules register additional variables, see e.g. mod_ssl .
+ Some modules register additional variables, see e.g.
+ mod_ssl .
false", or "no" (case insensitive).
True otherwise.-R%{REMOTE_ADDR} -ipmatch ...", but more efficient
+ %{REMOTE_ADDR} -ipmatch ...", but more
+ efficient
respreqenvv can be used too to access variables).v can be used too to access
+ variables).osenvnotereq_novary function can be used to
prevent names from being added to the Vary header.
- 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.
- Functions names are not case sensitive.
- Modules may register additional functions.
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. Functions names are not case
+ sensitive. Modules may register additional functions.
There are no built-in list-valued functions. The following examples show how expressions might be used to evaluate requests: The following examples show how expressions might be used to
+ evaluate requests:PeerExtList. See the description of
@@ -530,7 +539,9 @@ listfunction ::= listfuncname "(" word ")"
string contained in string list
/regexp/m#regexp#/regexp/im#regexp#i