Skip to main content

Module message

Module message 

Source
Expand description

What a request and a response are made of: a status, a method, field lines.

These types replace the http crate, which this server reached for only because the h3 crate’s API was written in it. It was never free: QPACK had already produced a name and a value for every field when HeaderName and HeaderValue validated and copied them a second time, and the pseudo-headers were folded into a URI that crate::tunnel then took apart again. What a proxy needs of an HTTP message is small enough to state here – five pseudo-headers, the fields that followed them, and a status line – so a field section is now decoded once, validated once, and carried in one type.

§What belongs here

Syntax: which octets a name, a value or a status may be made of. The rules about a message – which pseudo-headers a CONNECT request carries, what makes one malformed – belong to super::stream, which is where a decoded field section becomes a Request and where RFC 9114 §4.1.2’s verdict is reached.

Structs§

FieldValue
The value of one field line.
Fields
The field lines of a request or a response, in the order they arrived.
Request
A request: the pseudo-headers of RFC 9114 §4.3, then the fields that followed them.
Status
A response status code (RFC 9110 §15).

Enums§

Method
A request method (RFC 9110 §9).

Functions§

field_name
The name of one field line, if it is one this server will accept.
token
One RFC 9110 §5.6.2 token, if bytes are one.