Skip to content

Commit 4ecbd3b

Browse files
committedNov 27, 2018
http: reset headers_nread_ on llhttp parser reuse
PR-URL: nodejs-private/node-private#149 Reviewed-By: Fedor Indutny <fedor@indutny.com>
1 parent 04e0620 commit 4ecbd3b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed
 

‎src/node_http_parser.cc

+1
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)