diff options
author | Adrian Estrada <edsadr@gmail.com> | 2020-05-06 18:40:01 +0300 |
---|---|---|
committer | Shelley Vohr <shelley.vohr@gmail.com> | 2020-06-30 19:33:41 +0300 |
commit | c0534f7b8d43d7c59d7795906cd48725dbba0ea0 (patch) | |
tree | f3beb3fa0ca5949b1c9c7dcab210fbc7c7e7258d /benchmark | |
parent | 81a875f5dca11062259ff65f168f066d9cbf7913 (diff) |
benchmark: fixing http_server_for_chunky_client.js
PR-URL: https://github.com/nodejs/node/pull/33271
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/http/http_server_for_chunky_client.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/benchmark/http/http_server_for_chunky_client.js b/benchmark/http/http_server_for_chunky_client.js index ef0a23a0292..dafaf9122ef 100644 --- a/benchmark/http/http_server_for_chunky_client.js +++ b/benchmark/http/http_server_for_chunky_client.js @@ -10,7 +10,9 @@ process.env.PIPE_NAME = PIPE; tmpdir.refresh(); -const server = http.createServer((req, res) => { +// For Node.js versions below v13.3.0 this benchmark will require +// the flag --max-http-header-size 64000 in order to work properly +const server = http.createServer({ maxHeaderSize: 64000 }, (req, res) => { const headers = { 'content-type': 'text/plain', 'content-length': '2' @@ -28,7 +30,11 @@ const child = fork( `${__dirname}/_chunky_http_client.js`, process.argv.slice(2) ); -child.on('message', common.sendResult); +child.on('message', (data) => { + if (data.type === 'report') { + common.sendResult(data); + } +}); child.on('close', (code) => { server.close(); assert.strictEqual(code, 0); |