You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ja...@apache.org on 2015/08/29 02:01:45 UTC
[2/2] trafficserver git commit: TS-3874 Add documentation for header
conditionals in header-rewrite
TS-3874 Add documentation for header conditionals in header-rewrite
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/fd99ef71
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/fd99ef71
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/fd99ef71
Branch: refs/heads/master
Commit: fd99ef7160f9e6620f6da979ea8cbd780ffbecf4
Parents: 5cdbf45
Author: Thomas Jackson <ja...@apache.org>
Authored: Fri Aug 28 15:53:16 2015 -0700
Committer: Thomas Jackson <ja...@apache.org>
Committed: Fri Aug 28 16:43:11 2015 -0700
----------------------------------------------------------------------
doc/reference/plugins/header_rewrite.en.rst | 38 +++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/fd99ef71/doc/reference/plugins/header_rewrite.en.rst
----------------------------------------------------------------------
diff --git a/doc/reference/plugins/header_rewrite.en.rst b/doc/reference/plugins/header_rewrite.en.rst
index 84c2e13..1af5f12 100644
--- a/doc/reference/plugins/header_rewrite.en.rst
+++ b/doc/reference/plugins/header_rewrite.en.rst
@@ -159,7 +159,7 @@ is required to match that section of the URL.
Supported Option Names:
HOST
-
+
Example:
cond %{URL:HOST} =www.example.com
@@ -208,3 +208,39 @@ Examples
rm-header Set-Cookie
counter plugin.header_rewrite.x-y-foobar-dc1
cond %{HEADER:X-Y-Foobar} "Some string" [AND,NC]
+
+
+.. note:: Notes about header conditionals
+
+ In HTTP multple headers can be consolidated into a single comma separated string.
+ To avoid complex markup within header-rewrite all header conditionals are
+ evaluated against all values of the header normalized into a single comma separated string.
+ Some examples:
+
+ Conditions
+ ::
+ # rule 1
+ cond %{HEADER:foo} /bar/
+
+ # rule 2
+ cond %{HEADER:foo} =bar
+
+ Examples
+ ::
+
+ # matches 1 and 2
+ foo: bar
+
+ # matches 1
+ foo: bar
+ foo: baz
+
+ # matches 1
+ foo: baz
+ foo: bar
+
+ # matches 1
+ foo: bar,baz
+
+ # matches 1
+ foo: baz,bar