summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/matchers_test.go
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2019-11-28 21:11:45 -0700
committerMatthew Holt <mholt@users.noreply.github.com>2019-11-28 21:11:45 -0700
commit14d3fd7d0307e69c3c8995c42052b9103d1e2299 (patch)
treebd6ac36a7034cfa27226151c9e275b60ab94f3f0 /modules/caddyhttp/matchers_test.go
parent512b004332ebf6dfa3fd14269de3cb0031233e34 (diff)
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 4569425..321d3ce 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,