hyperium / hyperium/h2

Add option to send ORIGIN frame

Open
#632 3 comments 0 reactions 0 assignees View on GitHub

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 origin is 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 the http crate.
    • 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.rs file such that Connection has an Option<Origin>, and if set, is written after the initial SETTINGS frame.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.