From 6d0350d04ecd7074a65d57f03bd721e75537c13d Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Thu, 20 Jun 2019 20:24:46 -0600 Subject: caddyhttp: Fix host matching when host has a port --- modules/caddyhttp/matchers_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'modules/caddyhttp/matchers_test.go') diff --git a/modules/caddyhttp/matchers_test.go b/modules/caddyhttp/matchers_test.go index 08ab156..597d217 100644 --- a/modules/caddyhttp/matchers_test.go +++ b/modules/caddyhttp/matchers_test.go @@ -87,6 +87,11 @@ func TestHostMatcher(t *testing.T) { input: "sub.foo.example.net", expect: false, }, + { + match: MatchHost{"example.com"}, + input: "example.com:5555", + expect: true, + }, } { req := &http.Request{Host: tc.input} actual := tc.match.Match(req) -- cgit v1.2.3