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: address timing issues in simple http tests · nodejs/node@cf9ba81

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-http-default-encoding.js
    • test-http-request-end.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/parallel/test-http-default-encoding.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-default-encoding.js
+2-7Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,11 @@ var server = http.Server(function(req, res) {
1111
req.on('data', function(chunk) {
1212
result += chunk;
1313
}).on('end', function() {
14-
clearTimeout(timeout);
1514
server.close();
15+
res.writeHead(200);
16+
res.end('hello world\n');
1617
});
1718

18-
var timeout = setTimeout(function() {
19-
process.exit(1);
20-
}, 100);
21-
22-
res.writeHead(200);
23-
res.end('hello world\n');
2419
});
2520

2621
server.listen(common.PORT, function() {
Collapse file

‎test/parallel/test-http-request-end.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-http-request-end.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ var server = http.Server(function(req, res) {
1414

1515
req.on('end', function() {
1616
server.close();
17+
res.writeHead(200);
18+
res.end('hello world\n');
1719
});
1820

19-
res.writeHead(200);
20-
res.end('hello world\n');
2121
});
2222

2323
server.listen(common.PORT, function() {

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.