http: reset headers_nread_ on llhttp parser reuse
PR-URL: https://github.com/nodejs-private/node-private/pull/149 Reviewed-By: Fedor Indutny <fedor@indutny.com>
This commit is contained in:
parent
af8d9e3972
commit
7bfcfc2ffe
@ -784,6 +784,7 @@ class Parser : public AsyncWrap, public StreamListener {
|
|||||||
void Init(parser_type_t type) {
|
void Init(parser_type_t type) {
|
||||||
#ifdef NODE_EXPERIMENTAL_HTTP
|
#ifdef NODE_EXPERIMENTAL_HTTP
|
||||||
llhttp_init(&parser_, type, &settings);
|
llhttp_init(&parser_, type, &settings);
|
||||||
|
header_nread_ = 0;
|
||||||
#else /* !NODE_EXPERIMENTAL_HTTP */
|
#else /* !NODE_EXPERIMENTAL_HTTP */
|
||||||
http_parser_init(&parser_, type);
|
http_parser_init(&parser_, type);
|
||||||
#endif /* NODE_EXPERIMENTAL_HTTP */
|
#endif /* NODE_EXPERIMENTAL_HTTP */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user