Closed wonter closed 4 years ago
http-parser is basically a state machine so if you keep track of when your callbacks are invoked, you can keep track of the state.
on_header_field
, on_header_value
and on_headers_complete
in particular are the callbacks you'd care about.
Hi
I am writing an http proxy and parsing HTTP messages using
http-parser
In most cases, proxy will add some additional headers such as
X-Forwarded-Host
,Proxy-Authorization
and so onSo i'd like to split HTTP message to 3 parts which is:
But
http-parser
doesn't provide some API to help me determine the boundaries of HTTP headerIs there any way to do it?