From b16d570395656b92450a5f9f9568292b3abe8264 Mon Sep 17 00:00:00 2001 From: Anatoli Papirovski Date: Tue, 21 Nov 2017 08:46:13 -0500 Subject: [PATCH] benchmark: set maxHeaderListPairs in h2 headers.js PR-URL: https://github.com/nodejs/node/pull/17194 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- benchmark/http2/headers.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/benchmark/http2/headers.js b/benchmark/http2/headers.js index 62156774caa49d..3c8d0465acb0d0 100644 --- a/benchmark/http2/headers.js +++ b/benchmark/http2/headers.js @@ -13,7 +13,9 @@ function main(conf) { const n = +conf.n; const nheaders = +conf.nheaders; const http2 = require('http2'); - const server = http2.createServer(); + const server = http2.createServer({ + maxHeaderListPairs: 20000 + }); const headersObject = { ':path': '/', @@ -34,7 +36,9 @@ function main(conf) { stream.end('Hi!'); }); server.listen(PORT, () => { - const client = http2.connect(`http://localhost:${PORT}/`); + const client = http2.connect(`http://localhost:${PORT}/`, { + maxHeaderListPairs: 20000 + }); function doRequest(remaining) { const req = client.request(headersObject);