summaryrefslogtreecommitdiff
path: root/src/node_http_parser.cc
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-07-21 13:26:50 +0200
committerAnna Henningsen <anna@addaleax.net>2017-07-26 20:06:09 +0200
commit29353e5a992c1e7f92fafa4d1429e0f8dd494155 (patch)
treed2fe0d1bb6dd537ef023be0453551a6e4311c09c /src/node_http_parser.cc
parent75a19fb379c2d936c6945e63de7c4a28e93eb17d (diff)
downloadandroid-node-v8-29353e5a992c1e7f92fafa4d1429e0f8dd494155.tar.gz
android-node-v8-29353e5a992c1e7f92fafa4d1429e0f8dd494155.tar.bz2
android-node-v8-29353e5a992c1e7f92fafa4d1429e0f8dd494155.zip
http: reset stream to unconsumed in `unconsume()`
Reset the underlying socket of an HTTP stream to be marked as unconsume after the HTTP parser no longer owns it. Fixes: https://github.com/nodejs/node/issues/14407 PR-URL: https://github.com/nodejs/node/pull/14410 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'src/node_http_parser.cc')
-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 a339043bdc..90fc3b41b5 100644
--- a/src/node_http_parser.cc
+++ b/src/node_http_parser.cc
@@ -527,6 +527,7 @@ class Parser : public AsyncWrap {
stream->set_alloc_cb(parser->prev_alloc_cb_);
stream->set_read_cb(parser->prev_read_cb_);
+ stream->Unconsume();
}
parser->prev_alloc_cb_.clear();