-
Notifications
You must be signed in to change notification settings - Fork 40
Structured Header Mappings
Mark Nottingham edited this page Nov 23, 2018
·
7 revisions
This is a mapping of existing common (not all) HTTP headers into the closest Structured Headers, along with notes about potential issues, mismatches, etc.
Just because a header value fits into a structured header type syntactically, doesn't mean SH can be used for it; for example, error handling is probably different between SH and existing implementations.
- Accept
- Accept-Encoding
- Accept-Language
- Alt-Svc
- Content-Type - single value; parameterised item?
- Forwarded
- TE
- Cache-Control
- Pragma
- Surrogate-Control
- Prefer
- Preference-Applied
- Digest - dict of identifiers, digest values
- Age
- Content-Length
- Access-Control-Max-Age
See this issue
- Alt-Used: identifier -
uses : - Host - hostname
- Content-Encoding - token
- Expect - token
- Origin - hostname
- Access-Control-Allow-Credentials
- Access-Control-Request-Method -
method - X-Content-Type-Options
- Access-Control-Allow-Origin -
uses :
- Accept-Patch
- Accept-Ranges
- Allow
- ALPN -
percent-encoded - Content-Language
- Transfer-Encoding
- Vary
- Trailer
- Access-Control-Allow-Headers -
field-name - Access-Control-Allow-Methods -
method - Access-Control-Request-Headers -
field-name
A viable strategy might be to define a H2 SETTING (etc) that creates a mapping between new headers and "old" ones; e.g., Cookie -> SH-Cookie.
Serialise as string
- Content-Location
- Location
- Referer
Serialise as integer? See this issue
- Date
- Expires
- If-Modified-Since
- If-Unmodified-Since
- Last-Modified
- Early-Data - integer or boolean
- Retry-After - integer / Date
- Cookie: NO (semicolon-separated)
- Set-Cookie: NO (semicolon-separated)
- Strict-Transport-Security: NO (semicolon-separated)
- Authorization: NO
- WWW-Authenticate: NO
- Content-Disposition: NO (i18n)
- Content-Range: NO (range structure)
- Range: NO (range structure)
- ETag: NO (weak flag)
- If-None-Match: NO (weak flag)
- If-Match: NO (alternate forms, weak flag)
- If-Range: NO (alternate forms)
- Link: NO (link structure)
- Via: NO (product/comment)
- Server: NO (product/comment)
- User-Agent: NO (product/comment)
NOTE: All contributions are made under these terms.