Skip to main content

Module head

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§

HeadError
Error returned by standalone HTTP/1 message-head operations.
HeadParser
Standalone HTTP/1 message-head parser configuration.

Enums§

HeadErrorKind
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_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.