Skip to main content

Module headers

Module headers 

Source
Expand description

WHATWG header list.

An ordered (name, value) list with case-insensitive lookup. get combines same-name values with , (per WHATWG), except set-cookie which combines with \n and is also readable split via Headers::get_set_cookie — matching Playwright’s RawHeaders (client/network.ts:931). Insertion order and the original name casing are preserved for iter, so the engine ships headers to reqwest exactly as assembled.

Structs§

Headers
An ordered, case-insensitive header list.

Functions§

is_valid_name
RFC 7230 token — a valid header field name (WHATWG “header name”).
is_valid_value
Whether an already-normalized value is a valid WHATWG “header value”: HTAB, SP, VCHAR, form-feed or NBSP.
normalize_value
WHATWG header value normalization (WPT headers-normalize): strip leading/trailing SP/HTAB, drop bare CR/LF, and treat an obs-fold (CRLF + SP/HTAB) as a single space; runs of inner whitespace collapse to the last one seen.