Function

Soup-3.0Soupheaders_parse_request

  • 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.

    Parameters

    • str: string

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

    • len: number

      length of str

    • req_headers: MessageHeaders

      Soup.MessageHeaders to store the header values in

    Returns [number, string, string, Soup.HTTPVersion]

    Soup.Status.OK if the headers could be parsed, or an HTTP error to be returned to the client if they could not be.