Skip to content

Commit

Permalink
http: fix backport of Slowloris headers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mcollina authored and rvagg committed Dec 3, 2018
1 parent 5166653 commit 5d9005c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5d9005c

Please sign in to comment.