Closed Fedcomp closed 4 years ago
Yes, of course. I've done it this way before: create a Request
with a 0-length headers slice, call req.parse(data)
, and then match on the result. If you got an Err(TooManyHeaders)
, you know it parsed the method, path, and version. Those fields will be set to Some
.
Oh sorry! i did the same but forgot i could still access the request. I am sorry.
For my purpose i need to completely ignore headers, i am only interested in request method and path.
Is there a way to ignore
TooManyHeaders
error and get all other request data?