Skip to content

Commit b16d570

Browse files
apapirovskiMylesBorins
authored andcommitted
benchmark: set maxHeaderListPairs in h2 headers.js
PR-URL: #17194 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 2bbc1f0 commit b16d570

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

benchmark/http2/headers.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ function main(conf) {
1313
const n = +conf.n;
1414
const nheaders = +conf.nheaders;
1515
const http2 = require('http2');
16-
const server = http2.createServer();
16+
const server = http2.createServer({
17+
maxHeaderListPairs: 20000
18+
});
1719

1820
const headersObject = {
1921
':path': '/',
@@ -34,7 +36,9 @@ function main(conf) {
3436
stream.end('Hi!');
3537
});
3638
server.listen(PORT, () => {
37-
const client = http2.connect(`http://localhost:${PORT}/`);
39+
const client = http2.connect(`http://localhost:${PORT}/`, {
40+
maxHeaderListPairs: 20000
41+
});
3842

3943
function doRequest(remaining) {
4044
const req = client.request(headersObject);

0 commit comments

Comments
 (0)