Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

proposal: net/http: allow serving HTTP/2 without HTTP/1.1 fallback #75168

Closed as not planned
Labels
LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a tool Proposal
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    LibraryProposalIssues describing a requested change to the Go standard library or x/ libraries, but not to a tool Proposal

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /