pub fn parse_request_head(bytes: &[u8]) -> Result<RequestHead, String>Expand description
Parse an HTTP/1.1 request head (everything before the terminating blank line).
Deliberately hand-written rather than pulling in another HTTP parser: the upgrade request is a request line plus headers, and the validation that matters (RFC 6455 ยง4.2.1) is done on the result, not by the parser.