proposal: x/net/http2: add EnableConnectProtocol to Server #72071
Labels
LibraryProposal
Issues describing a requested change to the Go standard library or x/ libraries, but not to a tool
Proposal
Milestone
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 inhttp2.Server
, and this config is merged with h2 configurations, I propose we removehttp2xconnect
debug environmental variable and add a new dedicated fieldEnableConnectProtocol
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.
The text was updated successfully, but these errors were encountered: