@@ -2019,6 +2019,27 @@ due to security implications, and instead recommend enforcing strict MIME types
2019
2019
2020
2020
New MIME types should have a specification and should be registered with the Internet Assigned Numbers Authority (IANA).
2021
2021
2022
+ <h3 id="new-http-header-syntax">New HTTP Headers</h3>
2023
+
2024
+ If you are defining a new HTTP header,
2025
+ its syntax mustn't go against
2026
+ [the HTTP specification] (https://tools.ietf.org/html/rfc7230#section-3.2).
2027
+
2028
+ If the new header must convey structured data,
2029
+ such as lists, dictionaries, or typed values
2030
+ like decimals, strings, or booleans,
2031
+ then the header should use the syntax
2032
+ defined in [Structured Field Values for HTTP] (https://tools.ietf.org/html/rfc8941).
2033
+ This avoids consumers of the header
2034
+ having to write and maintain specific micro-parsers,
2035
+ or even worse,
2036
+ something that would break those existing parsers.
2037
+ If the new header requires data
2038
+ that can't be represented by Structured Field Values,
2039
+ then either engage with IETF about
2040
+ extending the Structured Field Values syntax,
2041
+ or re-consider if an HTTP header is a right place
2042
+ to expose the data before inventing a new syntax. [[RFC8941]]
2022
2043
2023
2044
<h3 id="extend-manifests">Extend existing manifest files rather than creating new ones</h3>
2024
2045
0 commit comments