diff options
author | Rod Vagg <rod@vagg.org> | 2018-11-27 11:04:09 +1100 |
---|---|---|
committer | Rod Vagg <rod@vagg.org> | 2018-11-28 11:36:34 +1100 |
commit | 7bfcfc2ffe4940898cf7b70890a55eb91cbdd112 (patch) | |
tree | 9a49a36dff69fac2343775c9b9e80a1f656e6d62 /src/node_http_parser.cc | |
parent | af8d9e3972bba423ab0027239062b894030db5c7 (diff) | |
download | node-new-7bfcfc2ffe4940898cf7b70890a55eb91cbdd112.tar.gz |
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>
Diffstat (limited to 'src/node_http_parser.cc')
-rw-r--r-- | src/node_http_parser.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index e24f378e3f..18ac6599d8 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -784,6 +784,7 @@ class Parser : public AsyncWrap, public StreamListener { void Init(parser_type_t type) { #ifdef NODE_EXPERIMENTAL_HTTP llhttp_init(&parser_, type, &settings); + header_nread_ = 0; #else /* !NODE_EXPERIMENTAL_HTTP */ http_parser_init(&parser_, type); #endif /* NODE_EXPERIMENTAL_HTTP */ |