Function soup::headers_parse_request
source · pub fn headers_parse_request(
str: &str,
req_headers: &MessageHeaders
) -> (u32, GString, GString, HTTPVersion)
Expand description
Parses the headers of an HTTP request in @str and stores the results in @req_method, @req_path, @ver, and @req_headers.
Beware that @req_headers may be modified even on failure.
§str
the headers (up to, but not including, the trailing blank line)
§len
length of @str
§req_headers
#SoupMessageHeaders to store the header values in
§Returns
Status::Ok
if the headers could be parsed, or an
HTTP error to be returned to the client if they could not be.
§req_method
if non-None
, will be filled in with the
request method
§req_path
if non-None
, will be filled in with the
request path
§ver
if non-None
, will be filled in with the HTTP
version