mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
http2: replace var with let/const
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
eb30b2c819
commit
0271f1b067
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user