From: Eric Covener Date: Sat, 17 Sep 2016 20:41:07 +0000 (+0000) Subject: Merge r1761272 from trunk: X-Git-Tag: 2.4.24~241 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0657543f73f8307fc2e31b6151492ad10fecfe69;p=thirdparty%2Fapache%2Fhttpd.git Merge r1761272 from trunk: expand third common in the expression functions doc Explain some risks at looking at per-request environment variables set by other modules within . http://stackoverflow.com/questions/39462011/htaccess-if-else-always-selects-else git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1761274 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/expr.xml b/docs/manual/expr.xml index 525843bdfce..6226f213fb4 100644 --- a/docs/manual/expr.xml +++ b/docs/manual/expr.xml @@ -464,7 +464,7 @@ listfunction ::= listfuncname "(" word ")" - + @@ -475,15 +475,15 @@ listfunction ::= listfuncname "(" word ")" + v can also be used to access variables). + - + + osenv @@ -506,15 +506,39 @@ listfunction ::= listfuncname "(" word ")" encoding + + + + regular file)
NameDescriptionRestricted
NameDescriptionSpecial notes
req, http Get HTTP request header; header names may be added to the Vary header, see below
Get HTTP response header
reqenv Lookup request environment variable (as a shortcut, - v can be used too to access - variables).
ordering
osenv Lookup operating system environment variable
noteLookup request note
Lookup request noteordering
env Return first match of note, reqenv, - osenv
ordering
tolower Convert string to lower case
toupper
file Read contents from a file (including line endings, when present) - yes
restricted
filemodReturn last modification time of a file (or 0 if file does not exist + or is not regular file)restricted
filesize Return size of a file (or 0 if file does not exist or is not - regular file)yes
restricted
-

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

+

The functions marked as "restricted" in the final column are not + available in some modules like mod_include.

+ +

The functions marked as "ordering" in the final column require some + consideration for the ordering of different components of the server, + especially when the function is used within the + <If> directive which is + evaluated relatively early.

+ + Environment variable ordering + When environment variables are looked up within an + <If> condition, it's important + to consider how extremely early in request processing that this + resolution occurs. As a guideline, any directive defined outside of virtual host + context (directory, location, htaccess) is not likely to have yet had a + chance to execute. SetEnvIf + in virtual host scope is one directive that runs prior to this resolution +
+
+ When reqenv is used outside of <If>, the resolution will generally occur later, but the + exact timing depends on the directive the expression has been used within. +

When the functions req or http are used, the header name will automatically be added to the Vary header of the