GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: minor adjustments to test-http2-respond-file · nodejs/node@bd0d19d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-http2-respond-file.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-http2-respond-file.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http2-respond-file.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const data = fs.readFileSync(fname);
1919
const stat = fs.statSync(fname);
2020

2121
const server = http2.createServer();
22-
server.on('stream', (stream) => {
22+
server.on('stream', common.mustCall((stream) => {
2323
stream.respondWithFile(fname, {
2424
[HTTP2_HEADER_CONTENT_TYPE]: 'text/plain'
2525
}, {
@@ -28,9 +28,9 @@ server.on('stream', (stream) => {
2828
headers[HTTP2_HEADER_CONTENT_LENGTH] = stat.size;
2929
}
3030
});
31-
});
32-
server.listen(0, () => {
31+
}));
3332

33+
server.listen(0, common.mustCall(() => {
3434
const client = http2.connect(`http://localhost:${server.address().port}`);
3535
const req = client.request();
3636

@@ -49,4 +49,4 @@ server.listen(0, () => {
4949
server.close();
5050
}));
5151
req.end();
52-
});
52+
}));

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.