Skip to main content

is_header_name

Function is_header_name 

Source
pub fn is_header_name(s: &str, strict: bool) -> bool
Expand description

Well-known regex — HTTP header name.

strict=true follows RFC 7230 token syntax (delegated to http::HeaderName::from_bytes) plus HTTP/2 pseudo-headers starting with : (which the http crate rejects); strict=false is looser (no CR/LF/NUL).