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

Add option to send ORIGIN frame #632

Open
seanmonstar opened this issue Aug 8, 2022 · 3 comments
Open

Add option to send ORIGIN frame #632

seanmonstar opened this issue Aug 8, 2022 · 3 comments

Comments

@seanmonstar
Copy link
Member

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.
@seanmonstar
Copy link
Member Author

cc @piscisaureus

@piscisaureus
Copy link

@lucacasonato
This would work for us right? AFAICT there would be no need to send the ORIGIN frame after processing the first request.

@lucacasonato
Copy link

Yeah, this looks good. We can determine the value of the ORIGIN frame based on an SNI field in the TLS handshake.

I have no preference between strings and (Scheme, Authority).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants