The request header conformance table: how both spines read Origin,
Referer, Host and Content-Type — the gates' inputs — and what a
request carrying given lines of them observably does.
request_header_conformance.json (beside this module) holds one row per
case, `{name, lines, read, post?, upgrade?, upgrade_runtime_refusal?,
wire_reason?, note?}`:
- lines — header lines, each
Name: value, one byte per character (a
character U+0080–U+00FF is that byte on the wire). A name may repeat. - read — each reader's reading of exactly those lines
(http/request_headers.ts, the Rust
fuz_http::request_headers):
origin, host and content_type are "absent", "refused", or
{"one": value} (HeaderRead; a content type's value is its lowercased
essence), and browser_context whether an Origin or Referer line is
there at all. - post and upgrade — what the request does on the wire, sent as an
RPC
POST and as a WebSocket upgrade: {"refused": code}, or
{"authenticates": credential} (null for none). The wire leg adds a
Host naming the server when the row has no Host line, and
Content-Type: application/json on the POST when it has no
Content-Type line, so a row says only what it is about. Where one
request trips several gates the row pins which answers: the host gate,
then the origin check, then the content type, then the credential legs. - upgrade_runtime_refusal — a runtime trait the row's upgrade meets
before the app runs on a backend declaring it
(
BackendCapabilities.ws_upgrade_runtime_refusals). - wire_reason — present instead of
post and upgrade on a row the
wire leg can't send as the row means it; the unit legs still read it.
The legs: the TS unit test over the readers (src/test/http/), the Rust
unit test beside fuz_http::request_headers over a byte-identical copy of
the file, and request_header_conformance_wire.ts, sending each row to a
live backend. Both unit legs also hold every row join-invariant: the
reading of its lines equals the reading of the same lines folded to one
line per name (fold_header_lines) — the view Bun and an in-process
app.request give the spine — which is what lets one expected column hold
on every runtime.
Live values are per leg, so lines name them with {placeholders}
(REQUEST_HEADER_CONFORMANCE_PLACEHOLDERS); the unit legs fill them from
the table's own unit_placeholders. Edited by hand, never generated.