Add option to send ORIGIN frame
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 382
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 9
Description
This proposes adding an option to the h2::server::Builder config such that it sends the ORIGIN frame to connections.
- A method
originis added to the h2::server::Builder` struct.- We need to decide on the method argument. How should a user provide the origin-set?
- The specification says the origin must ASCII, so we could just ask for a list of strings.
- Or, we could force the user to provide a list of
(Scheme, Authority)tuples, since we have those types in thehttpcrate. - I'm not convinced which way is better myself.
- A new file would be added,
src/frame/origin.rs.- Implement encoding of the ORIGIN header according the RFC.
- We don't need decoding for now.
- Update the
src/proto/connection.rsfile such thatConnectionhas anOption<Origin>, and if set, is written after the initialSETTINGSframe.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading h2::server::Builder and src/proto/connection.rs to understand configuration and the initial SETTINGS write. Then inspect the RFC requirements for ORIGIN encoding and the existing frame implementations before deciding how the origin-set argument should be represented. Done means the builder can configure an optional ORIGIN frame, src/frame/origin.rs encodes it, and the connection writes it after SETTINGS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend-api-design, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100