caddyhttp: Fix host matching when host has a port

This commit is contained in:
Matthew Holt 2019-06-20 20:24:46 -06:00
parent 15647bdfb7
commit 6d0350d04e
2 changed files with 25 additions and 13 deletions

View file

@ -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)