diff options
author | Matthew Holt <[email protected]> | 2019-11-28 21:11:45 -0700 |
---|---|---|
committer | Matthew Holt <[email protected]> | 2019-11-28 21:11:45 -0700 |
commit | 14d3fd7d0307e69c3c8995c42052b9103d1e2299 (patch) | |
tree | bd6ac36a7034cfa27226151c9e275b60ab94f3f0 /modules/caddyhttp/matchers_test.go | |
parent | 512b004332ebf6dfa3fd14269de3cb0031233e34 (diff) | |
download | caddy-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.go | 15 |
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, |