Skip to main content

io_http/rfc9110/
headers.rs

1//! Common HTTP header name constants ([RFC 9110 §5]), lowercase.
2//!
3//! [RFC 9110 §5]: https://www.rfc-editor.org/rfc/rfc9110#section-5
4
5/// Header names whose values are redacted in [`core::fmt::Debug`] output.
6pub const SENSITIVE_HEADERS: &[&str] = &[
7    AUTHORIZATION,
8    PROXY_AUTHORIZATION,
9    COOKIE,
10    SET_COOKIE,
11    WWW_AUTHENTICATE,
12    PROXY_AUTHENTICATE,
13];
14
15pub const AUTHORIZATION: &str = "authorization";
16pub const CONNECTION: &str = "connection";
17pub const CONTENT_LENGTH: &str = "content-length";
18pub const COOKIE: &str = "cookie";
19pub const LOCATION: &str = "location";
20pub const PROXY_AUTHENTICATE: &str = "proxy-authenticate";
21pub const PROXY_AUTHORIZATION: &str = "proxy-authorization";
22pub const SET_COOKIE: &str = "set-cookie";
23pub const TRANSFER_ENCODING: &str = "transfer-encoding";
24pub const WWW_AUTHENTICATE: &str = "www-authenticate";