From 966d5e6b42fc6da3da8bd39dd6ceceb8f1da3999 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Sat, 31 Oct 2020 12:27:01 -0400 Subject: caddyhttp: Merge header matchers in Caddyfile (#3832) --- .../integration/caddyfile_adapt/matcher_syntax.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'caddytest') diff --git a/caddytest/integration/caddyfile_adapt/matcher_syntax.txt b/caddytest/integration/caddyfile_adapt/matcher_syntax.txt index 53ec023..55c06ea 100644 --- a/caddytest/integration/caddyfile_adapt/matcher_syntax.txt +++ b/caddytest/integration/caddyfile_adapt/matcher_syntax.txt @@ -18,6 +18,13 @@ @matcher6 vars_regexp "{http.request.uri}" `\.([a-f0-9]{6})\.(css|js)$` respond @matcher6 "from vars_regexp matcher without name" + + @matcher7 { + header Foo bar + header Foo foobar + header Bar foo + } + respond @matcher7 "header matcher merging values of the same field" } ---------- { @@ -127,6 +134,27 @@ "handler": "static_response" } ] + }, + { + "match": [ + { + "header": { + "Bar": [ + "foo" + ], + "Foo": [ + "bar", + "foobar" + ] + } + } + ], + "handle": [ + { + "body": "header matcher merging values of the same field", + "handler": "static_response" + } + ] } ] } -- cgit v1.2.3