Skip to content

net/http: move HTTP/2 into std #67810

Open
@neild

Description

@neild

The net/http package includes transparent support for HTTP/2. The source of truth for this implementation is the golang.org/x/net/http2 package, which is vendored into std (using a rather complicated process to avoid import cycles). The http2 package also exposes a number of configuration settings and features which are not directly accessible from net/http.

There were good reasons for starting development of the HTTP/2 implementation outside of std, but the current state of affairs is confusing and inconvenient. Backporting HTTP/2 fixes into minor releases is difficult. New versions of net/http need to support old versions of x/net. We can't make changes to the HTTP/1 and HTTP/2 implementations atomically. Users need to import an x/ package to configure HTTP/2 settings.

This issue is a tracking issue for moving HTTP/2 into std.

The desired end state is that the canonical HTTP/2 implementation used by net/http is located in the main Go repository and golang.org/x/net/http2 is deprecated.

The golang.org/x/net/http2 package has a substantial API surface. Some of that functionality (such as server and client configuration settings) will be made available via net/http, some will move into new packages, and some will be deprecated. The first stage of this project is to make every non-deprecated feature of golang.org/x/net/http2 available elsewhere.

(Original discussion: #60746)

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions