summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRod Vagg <rod@vagg.org>2018-11-27 11:04:09 +1100
committerRod Vagg <rod@vagg.org>2018-11-28 11:36:34 +1100
commit7bfcfc2ffe4940898cf7b70890a55eb91cbdd112 (patch)
tree9a49a36dff69fac2343775c9b9e80a1f656e6d62 /src
parentaf8d9e3972bba423ab0027239062b894030db5c7 (diff)
downloadandroid-node-v8-7bfcfc2ffe4940898cf7b70890a55eb91cbdd112.tar.gz
android-node-v8-7bfcfc2ffe4940898cf7b70890a55eb91cbdd112.tar.bz2
android-node-v8-7bfcfc2ffe4940898cf7b70890a55eb91cbdd112.zip
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')
-rw-r--r--src/node_http_parser.cc1
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 */