Skip to content

Commit 5d9005c

Browse files
mcollinarvagg
authored andcommittedDec 3, 2018
http: fix backport of Slowloris headers
The backport of 618eebdd17 was not complete, and the starting time to parse the headers was not reset. PR-URL: #24796 Fixes: #24760 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 5166653 commit 5d9005c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎lib/_http_server.js

+3
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ function connectionListener(socket) {
481481
function parserOnIncoming(req, shouldKeepAlive) {
482482
incoming.push(req);
483483

484+
// Set to zero to communicate that we have finished parsing.
485+
socket.parser.parsingHeadersStart = 0;
486+
484487
// If the writable end isn't consuming, then stop reading
485488
// so that we don't become overwhelmed by a flood of
486489
// pipelined requests that may never be resolved.

0 commit comments

Comments
 (0)
Please sign in to comment.