aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules/caddyhttp/matchers_test.go
diff options
context:
space:
mode:
authorMatthew Holt <[email protected]>2019-11-28 21:11:45 -0700
committerMatthew Holt <[email protected]>2019-11-28 21:11:45 -0700
commit14d3fd7d0307e69c3c8995c42052b9103d1e2299 (patch)
treebd6ac36a7034cfa27226151c9e275b60ab94f3f0 /modules/caddyhttp/matchers_test.go
parent512b004332ebf6dfa3fd14269de3cb0031233e34 (diff)
downloadcaddy-14d3fd7d0307e69c3c8995c42052b9103d1e2299.tar.gz
caddy-14d3fd7d0307e69c3c8995c42052b9103d1e2299.zip
http: path matcher supports exact matching with = prefix
Diffstat (limited to 'modules/caddyhttp/matchers_test.go')
-rw-r--r--modules/caddyhttp/matchers_test.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go
index 456942588..321d3ce7e 100644
--- a/modules/caddyhttp/matchers_test.go
+++ b/modules/caddyhttp/matchers_test.go
@@ -213,6 +213,21 @@ func TestPathMatcher(t *testing.T) {
expect: false,
},
{
+ match: MatchPath{"=/foo"},
+ input: "/foo",
+ expect: true,
+ },
+ {
+ match: MatchPath{"=/foo"},
+ input: "/foo/bar",
+ expect: false,
+ },
+ {
+ match: MatchPath{"=/foo"},
+ input: "/FOO",
+ expect: true,
+ },
+ {
match: MatchPath{"/foo"},
input: "/FOO",
expect: true,