From 8fbda0105cce360b1f90d28d6a62d91e88f7c177 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Mon, 17 Jun 2019 06:26:52 -0200 Subject: [PATCH] doc: clarify when http emits aborted event --- doc/api/http.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 0588d7f408f194..f694004c0eb838 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -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'` 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.