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

x/net/http2: move frame operations to x/net/http2/http2frame #67819

Open
Tracked by #67810
neild opened this issue Jun 4, 2024 · 7 comments
Open
Tracked by #67810

x/net/http2: move frame operations to x/net/http2/http2frame #67819

neild opened this issue Jun 4, 2024 · 7 comments

Comments

@neild
Copy link
Contributor

neild commented Jun 4, 2024

This issue is part of a project to move x/net/http2 into std: #67810

The golang.org/x/net/http2 package includes support for reading and writing HTTP/2 frames. The http2.Framer type reads and writes frames, and a number of additional types represent specific frames.

Frame support adds a large amount of API surface that few users need. Users who send and receive HTTP/2 requests operate at a higher level than framing, which is an internal protocol detail.

I propose moving Framer and all of its ancillary types into a new golang.org/x/net/http2/http2frame package and eventually deprecating the versions in http2.

Specifically, the following types will move into the new package:

  • ContinuationFrame
  • DataFrame
  • Frame
  • FrameHeader
  • FrameType
  • FrameWriteRequest
  • Framer
  • GoAwayFrame
  • HeadersFrame
  • HeadersFrameParam
  • MetaHeadersFrame
  • PingFrame
  • PriorityFrame
  • PriorityParam
  • PushPromiseFrame
  • PushPromiseParam
  • RSTStreamFrame
  • SettingsFrame
  • UnknownFrame
  • WindowUpdateFrame
@gopherbot gopherbot added this to the Proposal milestone Jun 4, 2024
@rsc
Copy link
Contributor

rsc commented Jun 12, 2024

This proposal has been added to the active column of the proposals project
and will now be reviewed at the weekly proposal review meetings.
— rsc for the proposal review group

@rsc
Copy link
Contributor

rsc commented Jun 20, 2024

How would this enter std? Would it come in as net/http/http2frame?

@neild
Copy link
Contributor Author

neild commented Jun 20, 2024

This would not enter std. We'd move Framer out of x/net/http2 so we can (eventually) deprecate that package while leaving Framer un-deprecated, but I don't see a compelling reason to move Framer into std.

@rsc
Copy link
Contributor

rsc commented Jun 26, 2024

So an internal implementation of these types would come in, but there'd be no public API. Sounds good.

@rsc
Copy link
Contributor

rsc commented Jun 27, 2024

Have all remaining concerns about this proposal been addressed?

The proposal is in #67819 (comment).

@rsc
Copy link
Contributor

rsc commented Jul 25, 2024

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

The proposal is in #67819 (comment).

@rsc
Copy link
Contributor

rsc commented Jul 31, 2024

No change in consensus, so accepted. 🎉
This issue now tracks the work of implementing the proposal.
— rsc for the proposal review group

The proposal is in #67819 (comment).

@rsc rsc changed the title proposal: x/net/http2: move frame operations to x/net/http2/http2frame x/net/http2: move frame operations to x/net/http2/http2frame Jul 31, 2024
@rsc rsc modified the milestones: Proposal, Backlog Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Accepted
Development

No branches or pull requests

3 participants