| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent e384291 commit c737df6
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -480,6 +480,7 @@ class Http2ServerResponse extends Stream { | |||
| 480 | 480 | stream[kProxySocket] = null; | |
| 481 | 481 | stream[kResponse] = this; | |
| 482 | 482 | this.writable = true; | |
| 483 | + this.req = stream[kRequest]; | ||
| 483 | 484 | stream.on('drain', onStreamDrain); | |
| 484 | 485 | stream.on('aborted', onStreamAbortedResponse); | |
| 485 | 486 | stream.on('close', onStreamCloseResponse); | |
@@ -529,10 +530,6 @@ class Http2ServerResponse extends Stream { | |||
| 529 | 530 | return this[kStream].headersSent; | |
| 530 | 531 | } | |
| 531 | 532 | ||
| 532 | - get req() { | ||
| 533 | - return this[kStream][kRequest]; | ||
| 534 | - } | ||
| 535 | - | ||
| 536 | 533 | get sendDate() { | |
| 537 | 534 | return this[kState].sendDate; | |
| 538 | 535 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,9 @@ server.listen(0, common.mustCall(function() { | |||
| 14 | 14 | server.once('request', common.mustCall(function(request, response) { | |
| 15 | 15 | assert.strictEqual(response.req, request); | |
| 16 | 16 | ||
| 17 | + // Verify that writing to response.req is allowed. | ||
| 18 | + response.req = null; | ||
| 19 | + | ||
| 17 | 20 | response.on('finish', common.mustCall(function() { | |
| 18 | 21 | process.nextTick(() => { | |
| 19 | 22 | server.close(); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments