Summary

  • RFC 8941 defines Structured Fields: six data types, three container structures, and the parsing and serialization algorithms that connect them.
  • It is deliberately narrower than the field-value syntax HTTP already permits, and it binds only the fields that opt in.
  • The payoff is dull and enormous: two implementations handed the same bytes must arrive at the same parse.

Most HTTP header arguments are not arguments about meaning. They are arguments about where the comma goes.

Ask two proxies to split Cache-Control on a comma and you will get two answers, because the comma might be a list separator, might be inside a quoted string, and might be inside a quoted string that somebody's regex never learned about. The header means the same thing to both. The bytes do not. That gap is where the bugs live — and, occasionally, where the security advisories live.

RFC 8941, published in February 2021 by Mark Nottingham and Poul-Henning Kamp, is the industry's answer: stop inventing a fresh grammar for every header, and stop inheriting the loose one HTTP was born with. Give new fields a small, strict, unambiguous syntax, with parsing and serialization algorithms written down to the character. Then let the argument about commas die of neglect.

What it actually specifies

Six data types — Integer, Decimal, String, Token, Byte Sequence, Boolean — and three structures that hold them: Item, List, Dictionary. That is the whole vocabulary. Everything else is the algorithm that turns bytes into those values and back again, deterministically, with no room for a lenient parser to be helpful.

The narrowness is the point. RFC 8941 does not replace the field-value grammar in HTTP itself; it sits beside it as an option for new work. A field either declares itself a Structured Field or it does not. If it does, every implementation parses it the same way. If it does not, it keeps whatever grammar it was born with, along with whatever arguments that grammar attracts.

Who took the option

More fields than the "boring" framing suggests. Cache-Status uses it to report which cache did what. Priority uses it to express how a client wants its requests ordered. HTTP Message Signatures uses it for the signature and signature-input dictionaries — a case where "two parsers might disagree" stops being an inconvenience and becomes a verification failure.

That last one is the tell. Once a header carries cryptographic material, ambiguity is no longer a style question. A signature covers bytes. If the parser that verifies and the parser that acts see different structures in the same bytes, the signature is protecting something nobody is reading.

The trade nobody advertises

Strictness is not free. It moves cost from implementers to specifiers. Writing a Structured Field definition means naming types, bounding integers, deciding what an empty list means, and specifying failure. Writing a legacy header definition means writing a sentence and letting a thousand parsers improvise.

That is a trade specifications rarely make, because the people who pay are the ones in the room and the people who benefit are the ones who arrive later. RFC 8941 makes the earlier, harder payment anyway. The result is a document that is dull to read and cheap to implement — which is roughly the correct ratio for infrastructure.

Why it matters beyond headers

There is a general lesson buried in a specification about commas, and it is not about HTTP.

A coordination layer works when validity can be checked locally, by anyone, without asking permission. RFC 8941's grammar is deterministic: hand a parser the bytes and it knows whether they are valid, with no registry, no committee, and no interpretation of intent. The common layer is thin — six types, three structures — and everything else stays with the people running the code.

Compare that with systems that specify loosely and then govern thickly. Where the text is ambiguous, someone must interpret, and whoever interprets accumulates power that was never written down. The Internet's registry layer has spent two decades learning that the expensive way. HTTP, at least in this one corner, chose the cheaper route.

Boring is not the absence of design. It is what design looks like when it has been finished.