headersParseRequest

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.

uint
headersParseRequest

Parameters

str string

the headers (up to, but not including, the trailing blank line)

len int

length of str

reqHeaders soup.message_headers.MessageHeaders

#SoupMessageHeaders to store the header values in

reqMethod string

if non-null, will be filled in with the request method

reqPath string

if non-null, will be filled in with the request path

ver soup.types.HTTPVersion

if non-null, will be filled in with the HTTP version

Return Value

Type: uint

soup.types.Status.Ok if the headers could be parsed, or an HTTP error to be returned to the client if they could not be.