Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2018-12-03 12:53:24 +0300
committerRod Vagg <rod@vagg.org>2018-12-03 15:26:09 +0300
commit5d9005c35963c3fefc93b607dff75c1471e819d7 (patch)
tree03388ec64948d9489b41c7092826dbce1085b4cf
parent5166653a1a23d2568e76ad19943e7bb5aa006251 (diff)
http: fix backport of Slowloris headers
The backport of https://github.com/nodejs/node/commit/618eebdd17 was not complete, and the starting time to parse the headers was not reset. PR-URL: https://github.com/nodejs/node/pull/24796 Fixes: https://github.com/nodejs/node/issues/24760 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
-rw-r--r--lib/_http_server.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/_http_server.js b/lib/_http_server.js
index 54e080717a7..a224cc795fc 100644
--- a/lib/_http_server.js
+++ b/lib/_http_server.js
@@ -481,6 +481,9 @@ function connectionListener(socket) {
function parserOnIncoming(req, shouldKeepAlive) {
incoming.push(req);
+ // Set to zero to communicate that we have finished parsing.
+ socket.parser.parsingHeadersStart = 0;
+
// If the writable end isn't consuming, then stop reading
// so that we don't become overwhelmed by a flood of
// pipelined requests that may never be resolved.