-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed as not planned
Labels
Milestone
@Gunni
Description
Proposal Details
Expose a Protocols or DisableHTTP1 option on http.Server that allows serving HTTP/2 without falling back to HTTP/1.1.
Currently, enabling HTTP/2 (including h2c) with net/http always implies enabling HTTP/1.1, since the HTTP/2 implementation is layered on top of the HTTP/1.1 server. There’s no way to refuse HTTP/1.1 connections while still accepting HTTP/2.
- Operators who wish to deprecate or disable HTTP/1.1 for security/operational reasons (see http1mustdie.com)
- Other modern servers (nginx, Envoy, etc.) allow administrators to explicitly disable HTTP/1.1 while continuing to serve HTTP/2
- As the ecosystem moves away from HTTP/1.1, lack of configurability in Go prevents projects like Caddy from allowing blocking of HTTP/1.1