Skip to content

Add option to send ORIGIN frame #632

Open
@seanmonstar

Description

@seanmonstar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions