From 364b8370282187a1dcbf721ebccb41cf2e178a1f Mon Sep 17 00:00:00 2001 From: Andre Malo Date: Sat, 22 Feb 2003 22:20:21 +0000 Subject: [PATCH] document new features of setenvif and mod_negotiation. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98768 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/content-negotiation.html.en | 13 +++++++++++++ docs/manual/content-negotiation.xml | 13 +++++++++++++ docs/manual/env.html.en | 20 +++++++++++++++----- docs/manual/env.xml | 23 ++++++++++++++++++----- docs/manual/mod/mod_setenvif.html.en | 5 ++++- docs/manual/mod/mod_setenvif.xml | 5 ++++- 6 files changed, 67 insertions(+), 12 deletions(-) diff --git a/docs/manual/content-negotiation.html.en b/docs/manual/content-negotiation.html.en index c42ce5f777..bbb5ffbdbb 100644 --- a/docs/manual/content-negotiation.html.en +++ b/docs/manual/content-negotiation.html.en @@ -483,6 +483,19 @@ Negotiation specification and to work effectively with properly configured clients.

+

In order to support advanced techniques (such as Cookies or + special URL-paths) to determine the user's preferred language, + since Apache 2.1 mod_negotiation recognizes + the environment variable + prefer-language. If it exists and contains an + appropriate language tag, mod_negotiation will + try to select a matching variant. If there's no such variant, + the normal negotiation process applies.

+ +

Example

+ SetEnvIf Cookie "language=(.+)" prefer-language=$1 +

+
top

Extensions to Transparent Content diff --git a/docs/manual/content-negotiation.xml b/docs/manual/content-negotiation.xml index d5f287d890..06a563b5dc 100644 --- a/docs/manual/content-negotiation.xml +++ b/docs/manual/content-negotiation.xml @@ -469,6 +469,19 @@ This is necessary to maintain compliance with the HTTP/1.1 specification and to work effectively with properly configured clients.

+ +

In order to support advanced techniques (such as Cookies or + special URL-paths) to determine the user's preferred language, + since Apache 2.1 mod_negotiation recognizes + the environment variable + prefer-language. If it exists and contains an + appropriate language tag, mod_negotiation will + try to select a matching variant. If there's no such variant, + the normal negotiation process applies.

+ + Example + SetEnvIf Cookie "language=(.+)" prefer-language=$1 + diff --git a/docs/manual/env.html.en b/docs/manual/env.html.en index 0d23152836..9d0dd31860 100644 --- a/docs/manual/env.html.en +++ b/docs/manual/env.html.en @@ -213,10 +213,7 @@ mechanisms to modify the way Apache behaves when talking to particular clients. To make these mechanisms as flexible as possible, they are invoked by defining environment variables, - typically with BrowserMatch, - though SetEnv and - PassEnv could also be used, - for example.

+ typically with BrowserMatch, though SetEnv and PassEnv could also be used, for example.

downgrade-1.0

@@ -265,9 +262,22 @@

nokeepalive

-

This disables KeepAlive when set.

+

This disables KeepAlive + when set.

+ +

prefer-language

+ +

This influences mod_negotiation's behaviour. If + it contains a language tag (such as en, ja + or x-klingon), mod_negotiation tries + to deliver a variant with that language. If there's no such variant, + the normal negotiation process + applies.

+ + +

redirect-carefully

diff --git a/docs/manual/env.xml b/docs/manual/env.xml index 69256c7548..50ce966ac4 100644 --- a/docs/manual/env.xml +++ b/docs/manual/env.xml @@ -239,10 +239,10 @@ mechanisms to modify the way Apache behaves when talking to particular clients. To make these mechanisms as flexible as possible, they are invoked by defining environment variables, - typically with BrowserMatch, - though SetEnv and - PassEnv could also be used, - for example.

+ typically with BrowserMatch, though SetEnv and PassEnv could also be used, for example.

downgrade-1.0 @@ -292,9 +292,22 @@
nokeepalive -

This disables KeepAlive when set.

+

This disables KeepAlive + when set.

+ +
prefer-language + +

This influences mod_negotiation's behaviour. If + it contains a language tag (such as en, ja + or x-klingon), mod_negotiation tries + to deliver a variant with that language. If there's no such variant, + the normal negotiation process + applies.

+ +
+
redirect-carefully diff --git a/docs/manual/mod/mod_setenvif.html.en b/docs/manual/mod/mod_setenvif.html.en index 8f32d846fc..65a54071f2 100644 --- a/docs/manual/mod/mod_setenvif.html.en +++ b/docs/manual/mod/mod_setenvif.html.en @@ -207,7 +207,10 @@ of

In the first form, the value will be set to "1". The second will remove the given variable if already defined, and the third will set the variable to the literal value given by - value.

+ value. Since version 2.1 Apache will + recognize occurrences of $1..$9 within + value and replace them by parenthesized subexpressions + of regex.

Example:

diff --git a/docs/manual/mod/mod_setenvif.xml b/docs/manual/mod/mod_setenvif.xml index 3bc75e79e6..a81ff3db28 100644 --- a/docs/manual/mod/mod_setenvif.xml +++ b/docs/manual/mod/mod_setenvif.xml @@ -189,7 +189,10 @@ of

In the first form, the value will be set to "1". The second will remove the given variable if already defined, and the third will set the variable to the literal value given by - value.

+ value. Since version 2.1 Apache will + recognize occurrences of $1..$9 within + value and replace them by parenthesized subexpressions + of regex.

Example: -- 2.40.0