mirror of
https://github.com/nodejs/node.git
synced 2025-08-16 06:08:50 +02:00
http: add maxHeaderSize property
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>
This commit is contained in:
parent
f0e460968e
commit
9ac108d834
3 changed files with 36 additions and 0 deletions
11
test/parallel/test-http-max-header-size.js
Normal file
11
test/parallel/test-http-max-header-size.js
Normal file
|
@ -0,0 +1,11 @@
|
|||
'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);
|
Loading…
Add table
Add a link
Reference in a new issue