Module head
Available on crate features
http and std only.Expand description
Standalone HTTP/1 message-head parsing and encoding.
This module handles only a request or response line plus header fields. It deliberately does not infer or encode an HTTP body framing mode, which makes it suitable for protocols such as ICAP that carry HTTP heads while framing the associated entity body themselves.
Structs§
- Head
Error - Error returned by standalone HTTP/1 message-head operations.
- Head
Parser - Standalone HTTP/1 message-head parser configuration.
Enums§
- Head
Error Kind - Classification for standalone HTTP/1 message-head failures.
Constants§
- DEFAULT_
MAX_ HEADERS - Default maximum number of HTTP header fields in one standalone head.
Functions§
- encode_
header_ block - Encode HTTP header fields and the empty line ending them, as a trailer section carries them, into an exactly sized buffer.
- encode_
header_ fields - Append HTTP header fields in their insertion order and original casing.
- encode_
request - Encode one standalone HTTP/1 request head.
- encode_
request_ target - Encode the HTTP/1 request-target selected by Rama connection metadata.
- encode_
response - Encode one standalone HTTP/1 response head.
- is_
http1_ connect_ target - Whether an HTTP/1
CONNECTcan nameuri: ashost:port(RFC 9112 §3.2.3), and never as an Extended CONNECT, whose HTTP/1.1 form is anUpgraderequest instead (RFC 8441 §5).