Description
This is a tracking issue for typed headers. I looked over the
HTTP headers page and categorized which headers would need to be ported.
There are probably some nuances in how we want to implement them, but this provides an overview of how far along we are in constructing typed constructors for all header types.
edit: I realize now that this might read a bit dated. I drafted this text back in December but forgot to post it. Some things may seem a bit outdated or different; the most important part is that we can track whether we can construct headers .
Authentication (auth
)
-
WWW-Authenticate
(auth::Authenticate
) -
Authorization
(auth::Authorization
) -
Proxy-Authenticate
(auth::ProxyAuthenticate
) -
Proxy-Authorization
(auth::ProxyAuthorization
)
Caching (cache
)
-
Age
(cache::Age
) -
Cache-Control
(cache::Control
) -
Clear-Site-Data
(cache::ClearSite
) -
Expires
(cache::Expires
) -
(HTTP/1.0 only)Pragma
(cache::Pragma
) -
(soon to be deprecated)Warning
(cache::Warning
)
Client Hints (client_hints
)
-
(experimental, implementation postponed)Accept-CH
(ch::Accept
) -
(experimental, implementation postponed)Accept-CH-Lifetime
(ch::Lifetime
) -
(experimental, implementation postponed)Early-Data
(ch::EarlyData
) -
(experimental, implementation postponed)Content-DPR
(ch::ContentDpr
) -
(experimental, implementation postponed)DPR
(ch::Dpr
) -
(experimental, implementation postponed)Device-Memory
(ch::DeviceMemory
) -
(experimental, implementation postponed)Save-Data
(ch::SaveData
) -
(experimental, implementation postponed)Viewport-Width
(ch::ViewportWidth
) -
(experimental, implementation postponed)Width
(ch::Width
)
Conditionals (conditionals
)
-
Last-Modified
(conditionals::LastModified
) -
Etag
(conditionals::Etag
) -
If-Match
(conditionals::IfMatch
) -
If-Modified-Since
(conditionals::IfModifiedSince
) -
If-Unmodified-Since
(conditionals::IfUnmodifiedSince
) -
Vary
(conditionals::Vary
)
Content Negotiation (content
)
-
Accept
(content::Accept
) -
(no longer supported by any browser)Accept-Charset
(content::Charset
) -
Accept-Encoding
(content::Encoding
) -
Accept-Language
(content::Language
)
Controls (controls
)
-
Expect
(controls::Expect
)
Cookies
I think this one is special, and we should re-export the
cookie
crate, and just expose get /
set cookies as methods on the Request
and Response
types. Let's just treat
them as built-ins to evade the name collision.
CORS (cors
)
-
Access-Control-Allow-Origin
(cors::AllowOrigin
) -
Access-Control-Allow-Credentials
(cors::AllowCredentials
) -
Access-Control-Allow-Headers
(cors::AllowHeaders
) -
Access-Control-Allow-Methods
(cors::AllowMethods
) -
Access-Control-Expose-Headers
(cors::ExposeHeaders
) -
Access-Control-Max-Age
(cors::MaxAge
) -
Access-Control-Request-Headers
(cors::RequestHeaders
) -
Access-Control-Request-Method
(cors::RequestMethod
) -
Access-Control-Origin
(cors::Origin
) -
Access-Control-Timing-Allow-Origin
(cors::TimingAllowOrigin
)
Do Not Track (privacy
)
-
DNT
(privacy::DoNotTrack
) -
Tk
(privacy::TrackingStatus
)
Content Information (content
)
-
Content-Disposition
(downloads::Disposition
) -
Content-Length
(content::Length
) -
Content-Type
(content::Type
) -
Content-Encoding
(content::Encoding
) -
Content-Language
(content::Language
) -
Content-Location
(content::Location
)
Proxies (proxies
)
-
Forwarded
(proxies::Forwarded
) -
Via
(proxies::Via
)
Response (response
)
-
Allow
(response::Allow
)
Range (content
)
-
Accept-Ranges
(range::Accept
) -
Range
(range::Range
) -
If-Range
(range::If
) -
Content-Range
(range::Content
)
Security (security
)
-
Cross-Origin-Opener-Policy
(security::Coop
) -
Cross-Origin-Resource-Policy
(security::Cors
) -
Content-Security-Policy
(security::Csp
) -
Content-Security-Policy-Report-Only
(security::Cspro
) -
Expect-CT
(security::Cspro
) -
Feature-Policy
(security::FeaturePolicy
) -
(deprecated)Public-Key-Pins
(security::HPKP
)
Other
- Alt-Svc
- Date
-
Large-Allocation(unspecced; firefox only) - Link
- Referer
- Retry-After
- SourceMap
- Upgrade
- User-Agent
- Keep-Alive