The request target conformance table: how both spines decode what a matched
route reads of the request target — the query string and the path params —
and what a request carrying a given target observably answers, the routing
of its method and path included.
request_target_conformance.json (beside this module) has three sections:
- query —
{name, query, read}: the raw query string (the text after
?, or null for a target with none) and what the strict query reader
(http/request_target.ts, the Rust fuz_http::request_target) reads of
it — {"pairs": [[name, value], …]}, every pair in order, or
{"refused": reason} (PercentDecodeError). - param —
{name, segment, read}: one raw path segment and what the
strict segment reader reads of it — {"value": text} or
{"refused": reason}. - wire — `{name, method, target, as, origin?, host?, headers?,
upgrade?, requires?, expect, expect_where_dot_segments_resolved?, note?}`:
a request sent over a raw socket with its method and target written as
is, by the principal
as names ("keeper_session", "none", or
"invalid_session" — the session cookie's name with a value that doesn't
verify), with origin as its one Origin line, host as its Host in
place of the backend's, and each of headers as a line of its own, as a
WebSocket upgrade when upgrade is set, and only to a backend declaring
every capability requires names. expect
pins the answer's status, the REST error code, and on a JSON-RPC
answer the envelope's id — which pins the decoding of an echoed value —
with its error code and data.reason; and where the row routes, the
Allow methods as a set ([] for none), a plain-text body byte for
byte (text), the Content-Type's kind of a bodiless HEAD answer
(media), and whether the session cookie is cleared (clears_session).
Never a whole JSON body, and never the DEV-only issues. A dot-segment
row's expect is the answer where the router reads the raw path, and
expect_where_dot_segments_resolved the answer where the runtime
resolves dot segments first (BackendCapabilities.runtime_resolves_dot_segments).
Wire targets name the backend's paths with {placeholders}
(REQUEST_TARGET_CONFORMANCE_PLACEHOLDERS), filled per backend.
The legs: the TS unit test over the readers (src/test/http/), the Rust
unit test beside fuz_http::request_target over a byte-identical copy of
the file, and request_target_conformance_wire.ts, sending each wire row to
a live backend. Edited by hand, never generated.