Skip to main content

validate_sozu_id_header

Function validate_sozu_id_header 

Source
pub fn validate_sozu_id_header(value: &str) -> Result<(), StateError>
Expand description

Validate a sozu_id_header value against the RFC 9110 §5.1 token grammar:

token  = 1*tchar
tchar  = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
         "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA

Rejects empty strings, non-ASCII bytes, controls (including CR/LF/tab), separators (including colon and space), and any other non-tchar byte.