doc: clarify when http emits aborted event

PR-URL: https://github.com/nodejs/node/pull/28262
Refs: https://github.com/nodejs/node/issues/28172
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Robert Nagy 2019-06-17 06:26:52 -02:00 committed by Anna Henningsen
parent 264cb79bc2
commit 1a4f27ae21
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -318,6 +318,10 @@ Until the data is consumed, the `'end'` event will not fire. Also, until
the data is read it will consume memory that can eventually lead to a
'process out of memory' error.
Unlike the `request` object, if the response closes prematurely, the
`response` object does not emit an `'error'` event but instead emits the
`'aborted'` event.
Node.js does not check whether Content-Length and the length of the
body which has been transmitted are equal or not.