From 6a30448bacfb03d83c6d0a4f73b2c3c46be6aac8 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Thu, 3 Aug 2017 13:18:38 -0700 Subject: [PATCH] http2: fix linting after rebase Backport-PR-URL: https://github.com/nodejs/node/pull/14813 Backport-Reviewed-By: Anna Henningsen Backport-Reviewed-By: Timothy Gu PR-URL: https://github.com/nodejs/node/pull/14239 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Matteo Collina --- lib/internal/http2/core.js | 14 +++++++------- .../test-http2-create-client-secure-session.js | 14 +++++++------- test/parallel/test-http2-getpackedsettings.js | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 4c97257f9d7f3e..aebd5de049039d 100755 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -546,7 +546,7 @@ function setupHandle(session, socket, type, options) { session[kHandle] = handle; const settings = typeof options.settings === 'object' ? - options.settings : Object.create(null); + options.settings : Object.create(null); session.settings(settings); process.nextTick(emit.bind(session, 'connect', session, socket)); @@ -1639,8 +1639,8 @@ function doSendFileFD(session, options, fd, headers, getTrailers, err, stat) { statOptions.length = statOptions.length < 0 ? stat.size - (+statOptions.offset) : - Math.min(stat.size - (+statOptions.offset), - statOptions.length); + Math.min(stat.size - (+statOptions.offset), + statOptions.length); if (headers[HTTP2_HEADER_CONTENT_LENGTH] === undefined) headers[HTTP2_HEADER_CONTENT_LENGTH] = statOptions.length; @@ -1889,7 +1889,7 @@ class ServerHttp2Stream extends Http2Stream { if (options.length !== undefined && typeof options.length !== 'number') throw new errors.TypeError('ERR_INVALID_OPT_VALUE', 'length', - options.length); + options.length); if (options.statCheck !== undefined && typeof options.statCheck !== 'function') { @@ -1970,7 +1970,7 @@ class ServerHttp2Stream extends Http2Stream { if (options.length !== undefined && typeof options.length !== 'number') throw new errors.TypeError('ERR_INVALID_OPT_VALUE', 'length', - options.length); + options.length); if (options.statCheck !== undefined && typeof options.statCheck !== 'function') { @@ -2453,7 +2453,7 @@ function getPackedSettings(settings) { if (settings.enablePush !== undefined && typeof settings.enablePush !== 'boolean') { const err = new errors.TypeError('ERR_HTTP2_INVALID_SETTING_VALUE', - 'enablePush', settings.enablePush); + 'enablePush', settings.enablePush); err.actual = settings.enablePush; throw err; } @@ -2516,7 +2516,7 @@ function getUnpackedSettings(buf, options = {}) { if (settings.enablePush !== undefined && typeof settings.enablePush !== 'boolean') { const err = new errors.TypeError('ERR_HTTP2_INVALID_SETTING_VALUE', - 'enablePush', settings.enablePush); + 'enablePush', settings.enablePush); err.actual = settings.enablePush; throw err; } diff --git a/test/parallel/test-http2-create-client-secure-session.js b/test/parallel/test-http2-create-client-secure-session.js index 824b899dfcdb40..6e0e2ca43da376 100644 --- a/test/parallel/test-http2-create-client-secure-session.js +++ b/test/parallel/test-http2-create-client-secure-session.js @@ -67,13 +67,13 @@ function verifySecureSession(key, cert, ca, opts) { // The server can be connected as 'localhost'. verifySecureSession( - loadKey('agent8-key.pem'), - loadKey('agent8-cert.pem'), - loadKey('fake-startcom-root-cert.pem')); + loadKey('agent8-key.pem'), + loadKey('agent8-cert.pem'), + loadKey('fake-startcom-root-cert.pem')); // Custom servername is specified. verifySecureSession( - loadKey('agent1-key.pem'), - loadKey('agent1-cert.pem'), - loadKey('ca1-cert.pem'), - { servername: 'agent1' }); + loadKey('agent1-key.pem'), + loadKey('agent1-cert.pem'), + loadKey('ca1-cert.pem'), + { servername: 'agent1' }); diff --git a/test/parallel/test-http2-getpackedsettings.js b/test/parallel/test-http2-getpackedsettings.js index 0e3744fc2713ef..75700bcb23b092 100644 --- a/test/parallel/test-http2-getpackedsettings.js +++ b/test/parallel/test-http2-getpackedsettings.js @@ -64,10 +64,10 @@ assert.doesNotThrow(() => http2.getPackedSettings({ enablePush: false })); { const check = Buffer.from([ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00, - 0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x01]); + 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00, + 0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01]); const packed = http2.getPackedSettings({ headerTableSize: 100, @@ -84,10 +84,10 @@ assert.doesNotThrow(() => http2.getPackedSettings({ enablePush: false })); { const packed = Buffer.from([ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00, - 0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04, - 0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x01]); + 0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00, + 0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04, + 0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x01]); [1, true, '', [], {}, NaN].forEach((i) => { assert.throws(() => {