summaryrefslogtreecommitdiff
path: root/modules/caddyhttp/server.go
diff options
context:
space:
mode:
authorMatt Holt <mholt@users.noreply.github.com>2022-10-13 11:30:57 -0600
committerGitHub <noreply@github.com>2022-10-13 11:30:57 -0600
commit6bad878a22e048762262d6fabe2144cefaf4ca81 (patch)
treed949d7efe31fb1e2ce6127fc35359382c88852aa /modules/caddyhttp/server.go
parent3e1fd2a8d4d1463574033fbbdf5c27a693f9a86c (diff)
httpcaddyfile: Improve detection of indistinguishable TLS automation policies (#5120)
* httpcaddyfile: Skip some logic if auto_https off * Try removing this check altogether... * Refine test timeouts slightly, sigh * caddyhttp: Assume udp for unrecognized network type Seems like the reasonable thing to do if a plugin registers its own network type. * Add comment to document my lack of knowledge * Clean up and prepare to merge Add comments to try to explain what happened
Diffstat (limited to 'modules/caddyhttp/server.go')
-rw-r--r--modules/caddyhttp/server.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/caddyhttp/server.go b/modules/caddyhttp/server.go
index 60fc3c3..7a244d2 100644
--- a/modules/caddyhttp/server.go
+++ b/modules/caddyhttp/server.go
@@ -500,14 +500,12 @@ func (s *Server) serveHTTP3(addr caddy.NetworkAddress, tlsCfg *tls.Config) error
switch addr.Network {
case "unix":
addr.Network = "unixgram"
- case "tcp":
- addr.Network = "udp"
case "tcp4":
addr.Network = "udp4"
case "tcp6":
addr.Network = "udp6"
default:
- return fmt.Errorf("unsure what network to use for HTTP/3 given network type: %s", addr.Network)
+ addr.Network = "udp" // TODO: Maybe a better default is to not enable HTTP/3 if we do not know the network?
}
lnAny, err := addr.Listen(s.ctx, 0, net.ListenConfig{})