diff options
author | cjihrig <cjihrig@gmail.com> | 2018-12-05 19:59:12 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-12-20 13:15:07 -0500 |
commit | 9ac108d834539122625c85bb0a88f51a62b22d36 (patch) | |
tree | 10d0b7935aef5ffcb0405e5aa57e153d9d7d20c6 /test/parallel/test-http-max-header-size.js | |
parent | f0e460968ef6e24f0882b111abd323f024055675 (diff) | |
download | android-node-v8-9ac108d834539122625c85bb0a88f51a62b22d36.tar.gz android-node-v8-9ac108d834539122625c85bb0a88f51a62b22d36.tar.bz2 android-node-v8-9ac108d834539122625c85bb0a88f51a62b22d36.zip |
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>
Diffstat (limited to 'test/parallel/test-http-max-header-size.js')
-rw-r--r-- | test/parallel/test-http-max-header-size.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/parallel/test-http-max-header-size.js b/test/parallel/test-http-max-header-size.js new file mode 100644 index 0000000000..07fbe90296 --- /dev/null +++ b/test/parallel/test-http-max-header-size.js @@ -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); |