Skip to main content

Module message

Module message 

Source
Expand description

The message model: requests, responses and their header collection.

A parsed message borrows the bytes it arrived in. Header entries hold spans into that buffer, so an unmodified message is written back byte for byte — including original capitalization, compact forms, the whitespace around each :, and line folding.

That is not fastidiousness. A proxy forwards far more headers than it inspects, and a stack that normalizes whitespace on the way through breaks signature-bearing headers and makes every packet capture an exercise in doubt.

Structs§

Header
One header field.
Headers
The ordered header collection.
Request
A parsed request.
Response
A parsed response.
StatusCode
A response status code, always in 100..=699.

Enums§

Message
A request or a response.
Method
A request method.
Version
The protocol version on a start line.

Traits§

TypedHeader
A header value that parses into a typed form.