Skip to content
Permalink
Browse files

http2: replace var with let/const

PR-URL: #30417
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
  • Loading branch information
pc3b3r authored and MylesBorins committed Nov 12, 2019
1 parent b21f46d commit bccef49b5b6886938855cfa8a46e6fc2c51c80cb
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/internal/http2/util.js
@@ -197,7 +197,7 @@ const IDX_OPTIONS_MAX_SESSION_MEMORY = 8;
const IDX_OPTIONS_FLAGS = 9;

function updateOptionsBuffer(options) {
var flags = 0;
let flags = 0;
if (typeof options.maxDeflateDynamicTableSize === 'number') {
flags |= (1 << IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE);
optionsBuffer[IDX_OPTIONS_MAX_DEFLATE_DYNAMIC_TABLE_SIZE] =
@@ -318,7 +318,7 @@ function getSettings(session, remote) {
}

function updateSettingsBuffer(settings) {
var flags = 0;
let flags = 0;
if (typeof settings.headerTableSize === 'number') {
flags |= (1 << IDX_SETTINGS_HEADER_TABLE_SIZE);
settingsBuffer[IDX_SETTINGS_HEADER_TABLE_SIZE] =
@@ -527,11 +527,11 @@ const assertWithinRange = hideStackFrames(
function toHeaderObject(headers) {
const obj = Object.create(null);
for (var n = 0; n < headers.length; n = n + 2) {
var name = headers[n];
var value = headers[n + 1];
const name = headers[n];
let value = headers[n + 1];
if (name === HTTP2_HEADER_STATUS)
value |= 0;
var existing = obj[name];
const existing = obj[name];
if (existing === undefined) {
obj[name] = name === HTTP2_HEADER_SET_COOKIE ? [value] : value;
} else if (!kSingleValueHeaders.has(name)) {

0 comments on commit bccef49

Please sign in to comment.
You can’t perform that action at this time.