From 5b8c481906a82a9c1a9b52d1ecf67e6e0cebb4fe Mon Sep 17 00:00:00 2001 From: telenord Date: Wed, 6 Nov 2019 14:19:22 +0300 Subject: [PATCH] http: http_common rename var to let and const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/30288 Reviewed-By: Сковорода Никита Андреевич Reviewed-By: James M Snell Reviewed-By: Gireesh Punathil Reviewed-By: Ruben Bridgewater --- lib/_http_common.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/_http_common.js b/lib/_http_common.js index c271ec54eb3ab2..ce3bda91cb64f9 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -95,7 +95,7 @@ function parserOnHeadersComplete(versionMajor, versionMinor, headers, method, incoming.url = url; incoming.upgrade = upgrade; - var n = headers.length; + let n = headers.length; // If parser.maxHeaderPairs <= 0 assume that there's no limit. if (parser.maxHeaderPairs > 0) @@ -124,8 +124,8 @@ function parserOnBody(b, start, len) { // Pretend this was the result of a stream._read call. if (len > 0 && !stream._dumped) { - var slice = b.slice(start, start + len); - var ret = stream.push(slice); + const slice = b.slice(start, start + len); + const ret = stream.push(slice); if (!ret) readStop(this.socket); }