You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can see, phr_parse_request has the ability to parse the request headers (+method, url and http version), but not the body, which is essential for POST-requests. It would be really nice, if the parser has an option to extract and return the body
The text was updated successfully, but these errors were encountered:
I know it's 4 months late, but for future reference, the header list is terminated by an empty line, i.e. a CRLF immediately after the last header line's trailing CRLF. That's how phr_parse_request knows when to terminate. The request body should begin immediately after the empty line. So you should be able to get a pointer to the request body by doing [buffer start address] + [return value of phr_parse_request]. And you can derive the body length from the Content-Length header.
As far as I can see,
phr_parse_request
has the ability to parse the request headers (+method, url and http version), but not the body, which is essential for POST-requests. It would be really nice, if the parser has an option to extract and return the bodyThe text was updated successfully, but these errors were encountered: