2018-05-27 16:41:35 +02:00
|
|
|
'use strict';
|
2025-05-20 21:00:50 +02:00
|
|
|
|
2018-06-08 07:13:55 +02:00
|
|
|
const common = require('../common');
|
|
|
|
if (!common.hasCrypto)
|
|
|
|
common.skip('missing crypto');
|
2018-05-27 16:41:35 +02:00
|
|
|
const assert = require('assert');
|
2025-05-20 21:00:50 +02:00
|
|
|
const { spawnSyncAndAssert } = require('../common/child_process');
|
2018-05-27 16:41:35 +02:00
|
|
|
const path = require('path');
|
|
|
|
|
2025-05-20 21:00:50 +02:00
|
|
|
spawnSyncAndAssert(process.execPath, [
|
2021-03-26 08:51:08 -07:00
|
|
|
path.resolve(__dirname, 'test-http2-ping.js'),
|
2025-05-20 21:00:50 +02:00
|
|
|
], {
|
|
|
|
env: {
|
|
|
|
...process.env,
|
|
|
|
NODE_DEBUG: 'http2',
|
|
|
|
NODE_DEBUG_NATIVE: 'http2',
|
|
|
|
},
|
|
|
|
}, {
|
|
|
|
trim: true,
|
|
|
|
stderr(output) {
|
|
|
|
assert.match(output,
|
|
|
|
/Setting the NODE_DEBUG environment variable to 'http2' can expose sensitive data/);
|
|
|
|
assert.match(output, /\(such as passwords, tokens and authentication headers\) in the resulting log\.\r?\n/);
|
|
|
|
assert.match(output, /Http2Session client \(\d+\) handling data frame for stream \d+\r?\n/);
|
|
|
|
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] reading starting\r?\n/);
|
|
|
|
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session client \(\d+\)\] closed with code 0\r?\n/);
|
|
|
|
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] closed with code 0\r?\n/);
|
|
|
|
assert.match(output, /HttpStream \d+ \(\d+\) \[Http2Session server \(\d+\)\] tearing down stream\r?\n/);
|
|
|
|
},
|
|
|
|
stdout: ''
|
|
|
|
});
|