diff options
author | Matthew Holt <mholt@users.noreply.github.com> | 2022-07-25 17:28:20 -0600 |
---|---|---|
committer | Matthew Holt <mholt@users.noreply.github.com> | 2022-07-25 17:28:20 -0600 |
commit | 1e18afb5c862d62be130d563785de5c58f08ae8e (patch) | |
tree | 08fe81f7042bd93293ab2034e27836171b8bc3f2 /caddytest | |
parent | 0bebea0d4c0321b9cd59be4b355020a3e28c0bcd (diff) |
httpcaddyfile: Detect ambiguous site definitions (fix #4635)
Previously, our "duplicate key in server block" logic was flawed because
it did not account for the site's bind address. We defer this check to
when the listener addresses have been assigned, but before we commit
a server block to its listener.
Also refined how network address parsing and joining works, which was
necessary for a less convoluted fix.
Diffstat (limited to 'caddytest')
-rw-r--r-- | caddytest/integration/caddyfile_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/caddytest/integration/caddyfile_test.go b/caddytest/integration/caddyfile_test.go index be85f4a..2758883 100644 --- a/caddytest/integration/caddyfile_test.go +++ b/caddytest/integration/caddyfile_test.go @@ -68,7 +68,7 @@ func TestDuplicateHosts(t *testing.T) { } `, "caddyfile", - "duplicate site address not allowed") + "ambiguous site definition") } func TestReadCookie(t *testing.T) { |