Skip to main content

Module trailer

Module trailer 

Available on crate features http and std only.
Expand description

Which fields a trailer section carries (RFC 9110 §6.5).

An outgoing trailer section sends a field when its definition allows trailers (HeaderName::is_allowed_in_trailers), or when the message’s ForbiddenTrailers allows it anyway, as a relay forwarding what it received does. A field that frames or routes a message, or belongs to one connection, is never sent nor kept on receipt: HTTP/2 and HTTP/3 treat it as malformed, and over HTTP/1.1 it could smuggle framing past a recipient that merges trailers into headers. HTTP/1.1, HTTP/2 and HTTP/3 share these rules: their RFCs give no reason to differ.

Enums§

ForbiddenTrailers
Which fields a message’s trailer section sends although their definitions do not allow them in trailers.

Functions§

is_never_a_trailer
Whether name frames or routes a message, or belongs to one connection: no trailer section carries it, sent or received.
is_sent_in_trailers
Whether an outgoing trailer section sends name, given what its message allowed; None is ForbiddenTrailers::DenyAll.