hyperium / http

Rust HTTP types
Apache License 2.0
1.14k stars 284 forks source link

Early-Data header (RFC 8470) #529

Open quasicomputational opened 2 years ago

quasicomputational commented 2 years ago

RFC 8470 defines an Early-Data header, but the http::header module doesn't have a corresponding EARLY_DATA constant that makes it convenient to use. Could such a thing be added, please?

seanmonstar commented 2 years ago

It should be easy to make a constant in your own code using HeaderName::from_static("early-data").

quasicomputational commented 2 years ago

Yeah, it's not like it's a blocker or anything. But this is a standard header and it is still a bit of ugliness to work around - especially since, on this side of the abstraction barrier, I can't declare it const, and there's a hazard in misspelling the name and only finding out at runtime instead of having it detected at compile time.