diff --git a/lib/_http_server.js b/lib/_http_server.js index f82685e2be4bcd..bd4c3261144054 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -595,6 +595,11 @@ function onParserExecuteCommon(server, socket, parser, state, ret, d) { } function resOnFinish(req, res, socket, state, server) { + if (!req.complete) { + req.on('end', resOnFinish.bind(null, req, res, socket, state, server)); + return; + } + // Usually the first incoming element should be our request. it may // be that in the case abortIncoming() was called that the incoming // array will be empty.