mirror of
https://github.com/nodejs/node.git
synced 2025-05-07 15:35:41 +00:00

This commit exposes the value of --max-http-header-size as a property of the http module. PR-URL: https://github.com/nodejs/node/pull/24860 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
402 B
JavaScript
12 lines
402 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { spawnSync } = require('child_process');
|
|
const http = require('http');
|
|
|
|
assert.strictEqual(http.maxHeaderSize, 8 * 1024);
|
|
const child = spawnSync(process.execPath, ['--max-http-header-size=10', '-p',
|
|
'http.maxHeaderSize']);
|
|
assert.strictEqual(+child.stdout.toString().trim(), 10);
|