Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal: x/net/http2: add EnableConnectProtocol to Server #72071

Open
WeidiDeng opened this issue Mar 3, 2025 · 2 comments
Open

proposal: x/net/http2: add EnableConnectProtocol to Server #72071

WeidiDeng opened this issue Mar 3, 2025 · 2 comments
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool Proposal
Milestone

Comments

@WeidiDeng
Copy link

Proposal Details

In this accepted proposal a new field is added to http.HTTP2Config to allow the h2 server to declare Extended Connect support without explicitly importing x/net/http2 package.

However, currently h2 package uses a global debug env http2xconnect to control this setting.

Given that other fields in http.HTTP2Config have a corresponding field in http2.Server, and this config is merged with h2 configurations, I propose we remove http2xconnect debug environmental variable and add a new dedicated field EnableConnectProtocol to control whether extended connect is enabled.

By default this field is false, so websocket connection made by clients still uses h1 upgrade mechanism, thus backward compatible. Extended connect support has to be enabled explicitly by the user.

This proposal only adds a new API, so there is no breaking change.

@gopherbot gopherbot added this to the Proposal milestone Mar 3, 2025
@gabyhelp gabyhelp added the LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool label Mar 3, 2025
@ianlancetaylor
Copy link
Member

CC @neild

@ianlancetaylor ianlancetaylor moved this to Incoming in Proposals Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LibraryProposal Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool Proposal
Projects
Status: Incoming
Development

No branches or pull requests

4 participants