module documentation

An API for storing HTTP header names and values.

Class Headers Stores HTTP headers in a key and multiple value format.
Exception InvalidHeaderName HTTP header names must be tokens, per RFC 9110 section 5.1.
Class _NameEncoder _NameEncoder converts HTTP header names to bytes and canonicalizies their capitalization.
Function _sanitizeLinearWhitespace Replace linear whitespace (\n, \r\n, \r) in a header value with a single space.
Type Variable _T Undocumented
Variable _nameEncoder The global name encoder.
def _sanitizeLinearWhitespace(headerComponent: bytes) -> bytes: (source)

Replace linear whitespace (\n, \r\n, \r) in a header value with a single space.

Parameters
headerComponent:bytesThe header value to sanitize.
Returns
bytesThe sanitized header value.

Undocumented

Value
TypeVar('_T')
_nameEncoder = (source)

The global name encoder.