Skip to content

Commit 6a30448

Browse files
jasnelladdaleax
authored andcommitted
http2: fix linting after rebase
Backport-PR-URL: #14813 Backport-Reviewed-By: Anna Henningsen <[email protected]> Backport-Reviewed-By: Timothy Gu <[email protected]> PR-URL: #14239 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent efd929e commit 6a30448

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

lib/internal/http2/core.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ function setupHandle(session, socket, type, options) {
546546
session[kHandle] = handle;
547547

548548
const settings = typeof options.settings === 'object' ?
549-
options.settings : Object.create(null);
549+
options.settings : Object.create(null);
550550

551551
session.settings(settings);
552552
process.nextTick(emit.bind(session, 'connect', session, socket));
@@ -1639,8 +1639,8 @@ function doSendFileFD(session, options, fd, headers, getTrailers, err, stat) {
16391639

16401640
statOptions.length =
16411641
statOptions.length < 0 ? stat.size - (+statOptions.offset) :
1642-
Math.min(stat.size - (+statOptions.offset),
1643-
statOptions.length);
1642+
Math.min(stat.size - (+statOptions.offset),
1643+
statOptions.length);
16441644

16451645
if (headers[HTTP2_HEADER_CONTENT_LENGTH] === undefined)
16461646
headers[HTTP2_HEADER_CONTENT_LENGTH] = statOptions.length;
@@ -1889,7 +1889,7 @@ class ServerHttp2Stream extends Http2Stream {
18891889
if (options.length !== undefined && typeof options.length !== 'number')
18901890
throw new errors.TypeError('ERR_INVALID_OPT_VALUE',
18911891
'length',
1892-
options.length);
1892+
options.length);
18931893

18941894
if (options.statCheck !== undefined &&
18951895
typeof options.statCheck !== 'function') {
@@ -1970,7 +1970,7 @@ class ServerHttp2Stream extends Http2Stream {
19701970
if (options.length !== undefined && typeof options.length !== 'number')
19711971
throw new errors.TypeError('ERR_INVALID_OPT_VALUE',
19721972
'length',
1973-
options.length);
1973+
options.length);
19741974

19751975
if (options.statCheck !== undefined &&
19761976
typeof options.statCheck !== 'function') {
@@ -2453,7 +2453,7 @@ function getPackedSettings(settings) {
24532453
if (settings.enablePush !== undefined &&
24542454
typeof settings.enablePush !== 'boolean') {
24552455
const err = new errors.TypeError('ERR_HTTP2_INVALID_SETTING_VALUE',
2456-
'enablePush', settings.enablePush);
2456+
'enablePush', settings.enablePush);
24572457
err.actual = settings.enablePush;
24582458
throw err;
24592459
}
@@ -2516,7 +2516,7 @@ function getUnpackedSettings(buf, options = {}) {
25162516
if (settings.enablePush !== undefined &&
25172517
typeof settings.enablePush !== 'boolean') {
25182518
const err = new errors.TypeError('ERR_HTTP2_INVALID_SETTING_VALUE',
2519-
'enablePush', settings.enablePush);
2519+
'enablePush', settings.enablePush);
25202520
err.actual = settings.enablePush;
25212521
throw err;
25222522
}

test/parallel/test-http2-create-client-secure-session.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ function verifySecureSession(key, cert, ca, opts) {
6767

6868
// The server can be connected as 'localhost'.
6969
verifySecureSession(
70-
loadKey('agent8-key.pem'),
71-
loadKey('agent8-cert.pem'),
72-
loadKey('fake-startcom-root-cert.pem'));
70+
loadKey('agent8-key.pem'),
71+
loadKey('agent8-cert.pem'),
72+
loadKey('fake-startcom-root-cert.pem'));
7373

7474
// Custom servername is specified.
7575
verifySecureSession(
76-
loadKey('agent1-key.pem'),
77-
loadKey('agent1-cert.pem'),
78-
loadKey('ca1-cert.pem'),
79-
{ servername: 'agent1' });
76+
loadKey('agent1-key.pem'),
77+
loadKey('agent1-cert.pem'),
78+
loadKey('ca1-cert.pem'),
79+
{ servername: 'agent1' });

test/parallel/test-http2-getpackedsettings.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ assert.doesNotThrow(() => http2.getPackedSettings({ enablePush: false }));
6464

6565
{
6666
const check = Buffer.from([
67-
0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00,
68-
0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04,
69-
0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64,
70-
0x00, 0x02, 0x00, 0x00, 0x00, 0x01]);
67+
0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00,
68+
0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04,
69+
0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64,
70+
0x00, 0x02, 0x00, 0x00, 0x00, 0x01]);
7171

7272
const packed = http2.getPackedSettings({
7373
headerTableSize: 100,
@@ -84,10 +84,10 @@ assert.doesNotThrow(() => http2.getPackedSettings({ enablePush: false }));
8484

8585
{
8686
const packed = Buffer.from([
87-
0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00,
88-
0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04,
89-
0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64,
90-
0x00, 0x02, 0x00, 0x00, 0x00, 0x01]);
87+
0x00, 0x01, 0x00, 0x00, 0x00, 0x64, 0x00, 0x03, 0x00, 0x00,
88+
0x00, 0xc8, 0x00, 0x05, 0x00, 0x00, 0x4e, 0x20, 0x00, 0x04,
89+
0x00, 0x00, 0x00, 0x64, 0x00, 0x06, 0x00, 0x00, 0x00, 0x64,
90+
0x00, 0x02, 0x00, 0x00, 0x00, 0x01]);
9191

9292
[1, true, '', [], {}, NaN].forEach((i) => {
9393
assert.throws(() => {

0 commit comments

Comments
 (0)