| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6133639 commit 09277fa
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,9 @@ process.env.PIPE_NAME = PIPE; | |||
| 10 | 10 | ||
| 11 | 11 | tmpdir.refresh(); | |
| 12 | 12 | ||
| 13 | - const server = http.createServer((req, res) => { | ||
| 13 | + // For Node.js versions below v13.3.0 this benchmark will require | ||
| 14 | + // the flag --max-http-header-size 64000 in order to work properly | ||
| 15 | + const server = http.createServer({ maxHeaderSize: 64000 }, (req, res) => { | ||
| 14 | 16 | const headers = { | |
| 15 | 17 | 'content-type': 'text/plain', | |
| 16 | 18 | 'content-length': '2' | |
@@ -28,7 +30,11 @@ const child = fork( | |||
| 28 | 30 | `${__dirname}/_chunky_http_client.js`, | |
| 29 | 31 | process.argv.slice(2) | |
| 30 | 32 | ); | |
| 31 | - child.on('message', common.sendResult); | ||
| 33 | + child.on('message', (data) => { | ||
| 34 | + if (data.type === 'report') { | ||
| 35 | + common.sendResult(data); | ||
| 36 | + } | ||
| 37 | + }); | ||
| 32 | 38 | child.on('close', (code) => { | |
| 33 | 39 | server.close(); | |
| 34 | 40 | assert.strictEqual(code, 0); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments