| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5682e50 commit 1a5dc6a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -724,7 +724,7 @@ function resetHeadersTimeoutOnReqEnd() { | |||
| 724 | 724 | const parser = this.socket.parser; | |
| 725 | 725 | // Parser can be null if the socket was destroyed | |
| 726 | 726 | // in that case, there is nothing to do. | |
| 727 | - if (parser !== null) { | ||
| 727 | + if (parser) { | ||
| 728 | 728 | parser.parsingHeadersStart = nowDate(); | |
| 729 | 729 | } | |
| 730 | 730 | } | |
| Original file line number | Diff line number | Diff 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(); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments