Skip to content

Commit 1a4f27a

Browse files
ronagaddaleax
authored andcommitted
doc: clarify when http emits aborted event
PR-URL: #28262 Refs: #28172 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 264cb79 commit 1a4f27a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/http.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ Until the data is consumed, the `'end'` event will not fire. Also, until
318318
the data is read it will consume memory that can eventually lead to a
319319
'process out of memory' error.
320320

321+
Unlike the `request` object, if the response closes prematurely, the
322+
`response` object does not emit an `'error'` event but instead emits the
323+
`'aborted'` event.
324+
321325
Node.js does not check whether Content-Length and the length of the
322326
body which has been transmitted are equal or not.
323327

0 commit comments

Comments
 (0)