Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bf84ed0

Browse filesBrowse files
apapirovskigibfahn
authored andcommitted
benchmark: set maxHeaderListPairs in h2 headers.js
PR-URL: #17194 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 1053108 commit bf84ed0
Copy full SHA for bf84ed0

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Collapse file

‎benchmark/http2/headers.js‎

Copy file name to clipboardExpand all lines: benchmark/http2/headers.js
+6-2Lines changed: 6 additions & 2 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.