hyperium / http

Rust HTTP types
Apache License 2.0
1.12k stars 283 forks source link

feat: add cache-status and cdn-cache-control header name constants #583

Closed acfoltzer closed 1 year ago

acfoltzer commented 1 year ago

Docs include pointers to the relevant RFCs, as these are not in the base HTTP semantics spec.

seanmonstar commented 1 year ago

I think this issue would be relevant here: https://github.com/hyperium/http/issues/573

acfoltzer commented 1 year ago

@seanmonstar thanks for the tip. I made some recommendations over in that thread. Since both of these are part of the IANA registry as non-provisional entries, I think we should definitely include them, but perhaps we should should add all the non-provisional registry names in one go?

seanmonstar commented 1 year ago

I was trying to read up on these headers, I didn't remember what they were. That's because they're new (2022)! Their respective RFCs claim their current status is "Proposed Standard". Are they used elsewhere? I don't seem to notice them on sites behind Cloudflare, Cloudfront, or GCP.

acfoltzer commented 1 year ago

Yeah, they're still relatively new, but are a standardization of a scattering of implementation-defined headers like Surrogate-Control and X-Cache. FWIW, once something makes it to the Proposed Standard state, things like header names are very unlikely to change (thus the permanent status for these in the IANA field name registry), it's mostly about nailing down details of edge cases at that point.