summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-max-headers-count.js
diff options
context:
space:
mode:
authorMatteo Collina <hello@matteocollina.com>2018-08-21 17:26:51 +0200
committerRod Vagg <rod@vagg.org>2018-11-28 11:36:34 +1100
commit186035243fad247e3955fa0c202987cae99e82db (patch)
tree5295da6874a1988a3c36682e95d19883f639b71c /test/parallel/test-http-max-headers-count.js
parent3ec85763f678aff5a962fbcbe76d844a1029e22e (diff)
downloadandroid-node-v8-186035243fad247e3955fa0c202987cae99e82db.tar.gz
android-node-v8-186035243fad247e3955fa0c202987cae99e82db.tar.bz2
android-node-v8-186035243fad247e3955fa0c202987cae99e82db.zip
deps,http: http_parser set max header size to 8KB
CVE-2018-12121 PR-URL: https://github.com/nodejs-private/node-private/pull/143 Ref: https://github.com/nodejs-private/security/issues/139 Ref: https://github.com/nodejs-private/http-parser-private/pull/2 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/parallel/test-http-max-headers-count.js')
-rw-r--r--test/parallel/test-http-max-headers-count.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/parallel/test-http-max-headers-count.js b/test/parallel/test-http-max-headers-count.js
index 05f4f774c2..9fcfe316e3 100644
--- a/test/parallel/test-http-max-headers-count.js
+++ b/test/parallel/test-http-max-headers-count.js
@@ -28,14 +28,14 @@ let requests = 0;
let responses = 0;
const headers = {};
-const N = 2000;
+const N = 100;
for (let i = 0; i < N; ++i) {
headers[`key${i}`] = i;
}
const maxAndExpected = [ // for server
[50, 50],
- [1500, 1500],
+ [1500, 102],
[0, N + 2] // Host and Connection
];
let max = maxAndExpected[requests][0];
@@ -56,7 +56,7 @@ server.maxHeadersCount = max;
server.listen(0, function() {
const maxAndExpected = [ // for client
[20, 20],
- [1200, 1200],
+ [1200, 103],
[0, N + 3] // Connection, Date and Transfer-Encoding
];
doRequest();