Skip to content

Commit 7bfcfc2

Browse files
committed
http: reset headers_nread_ on llhttp parser reuse
PR-URL: nodejs-private/node-private#149 Reviewed-By: Fedor Indutny <fedor@indutny.com>
1 parent af8d9e3 commit 7bfcfc2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/node_http_parser.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,7 @@ class Parser : public AsyncWrap, public StreamListener {
784784
void Init(parser_type_t type) {
785785
#ifdef NODE_EXPERIMENTAL_HTTP
786786
llhttp_init(&parser_, type, &settings);
787+
header_nread_ = 0;
787788
#else /* !NODE_EXPERIMENTAL_HTTP */
788789
http_parser_init(&parser_, type);
789790
#endif /* NODE_EXPERIMENTAL_HTTP */

0 commit comments

Comments
 (0)