hyperium / h2

HTTP 2.0 client & server implementation for Rust.
MIT License
1.36k stars 272 forks source link

Add option to send ORIGIN frame #632

Open seanmonstar opened 2 years ago

seanmonstar commented 2 years ago

This proposes adding an option to the h2::server::Builder config such that it sends the ORIGIN frame to connections.

seanmonstar commented 2 years ago

cc @piscisaureus

piscisaureus commented 2 years ago

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

lucacasonato commented 2 years ago

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).