Expand description
HTTP header objects that preserve http header cases
Although HTTP header names are supposed to be case-insensitive for compatibility, proxies ideally shouldn’t alter the HTTP traffic, especially the headers they don’t need to read.
This crate provide structs and methods to preserve the headers in order to build a transparent proxy.
Modules§
Structs§
- HMap
- A specialized multimap for header names and values.
- Method
- The Request Method (VERB)
- Request
Header - The HTTP request header type.
- Response
Header - The HTTP response header type.
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Version
- Represents a version of the HTTP spec.
Enums§
Traits§
- Into
Case Header Name - A trait that converts into case-sensitive header names.
Functions§
- header_
value_ from_ raw - Build a
HeaderValuefrom owned bytes, normalizing the value per RFC 9110 section 5.5 and RFC 9112 section 5.2: obs-fold continuations collapse to a single SP, and any stray CR / LF / NUL is replaced with SP. Zero-copy when the input contains no CR/LF/NUL. - header_
value_ from_ slice - Build a
HeaderValuefrom a borrowed slice, normalizing obs-fold per RFC 9112 section 5.2. The slice is copied into an owned buffer.