RFC 8941 (+ RFC 9651) is the parsing spec every modern HTTP header now piggybacks on — Cache-Status, Priority, Accept-CH, Signature-Input, Content-Digest, CDN-Cache-Control, Client-Hints. Paste any of them here to see the parsed item, list, or dictionary tree, its parameters, and a lint pass for the corner cases (leading zeros on integers, un-escaped strings, over-long tokens, forbidden characters, missing quotes on byte sequences, and the 15-digit / 12-digit / 6-digit precision caps).
Re-serialised from the parsed tree — whitespace collapses, canonical form for identifiers.
JSON view (Structured-Field-Tests format):
| Type | Syntax | Notes |
|---|---|---|
| Integer | -15, 1234567890123456* | ±15 digits max; no leading zeros; -0 ≡ 0. |
| Decimal | 3.14, -0.001 | ≤12 integer digits, 1–3 fractional; if only integer digits, prefer sf-integer. |
| String | "hello world" | ASCII 0x20–0x7E only; escape \\ and \". Use display-string for Unicode. |
| Token | hit, gzip, */foo | Starts with alpha or *, then a–z A–Z 0–9 _ . : % * / -. |
| Byte seq | :aGVsbG8=: | base64 wrapped in colons; empty is ::. |
| Boolean | ?0, ?1 | Only two legal values. |
| Date (RFC 9651) | @1704067200 | Unix seconds; treat as sf-integer for RFC-8941-only parsers. |
| Display string | %"caf%c3%a9" | RFC 9651; percent-encoded UTF-8, wrapped with %"…". |
| Inner list | (a b c);q=1 | Space-separated bare items wrapped in (…); may carry its own parameters. |
| Parameters | ;key=val;flag | Semi-colon list attached to any item; bare key means ?1. |
u=1, i for request/response prioritisation on HTTP/2 & /3.hit/fwd/fwd-status/ttl/key/collapsed parameters, one per intermediary.