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 — http: check for existance in resetHeadersTimeoutOnReqEnd · nodejs/node@1a5dc6a

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • _http_server.js
  • test/parallel
    • test-http-server-delete-parser.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/_http_server.js‎

Copy file name to clipboardExpand all lines: lib/_http_server.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ function resetHeadersTimeoutOnReqEnd() {
724724
const parser = this.socket.parser;
725725
// Parser can be null if the socket was destroyed
726726
// in that case, there is nothing to do.
727-
if (parser !== null) {
727+
if (parser) {
728728
parser.parsingHeadersStart = nowDate();
729729
}
730730
}
Collapse file

‎test/parallel/test-http-server-delete-parser.js‎

Copy file name to clipboard
+24Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
const http = require('http');
6+
7+
const server = http.createServer(common.mustCall((req, res) => {
8+
res.writeHead(200, { 'Content-Type': 'text/plain' });
9+
res.write('okay', common.mustCall(() => {
10+
delete res.socket.parser;
11+
}));
12+
res.end();
13+
}));
14+
15+
server.listen(1337, '127.0.0.1');
16+
server.unref();
17+
18+
const req = http.request({
19+
port: 1337,
20+
host: '127.0.0.1',
21+
method: 'GET',
22+
});
23+
24+
req.end();

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.