diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-05-30 20:24:12 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-10-13 19:04:44 -0700 |
commit | 5f80df882057522c38c30b99f4bf25d82c68f662 (patch) | |
tree | 608f8e77510cb4b029f02cfc2ff735688f1fe3d2 /doc/api/http.md | |
parent | 4ca61f40fed31d590e4d624551044fe7cc7efd42 (diff) | |
download | android-node-v8-5f80df882057522c38c30b99f4bf25d82c68f662.tar.gz android-node-v8-5f80df882057522c38c30b99f4bf25d82c68f662.tar.bz2 android-node-v8-5f80df882057522c38c30b99f4bf25d82c68f662.zip |
http: do not emit end after aborted
IncomingMessage will no longer emit end after aborted.
PR-URL: https://github.com/nodejs/node/pull/27984
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/http.md')
-rw-r--r-- | doc/api/http.md | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/doc/api/http.md b/doc/api/http.md index 2f1b37064b..1870de2594 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2252,6 +2252,25 @@ In the case of a connection error, the following events will be emitted: * `'error'` * `'close'` +In the case of a premature connection close before the response is received, +the following events will be emitted in the following order: + +* `'socket'` +* `'error'` with an error with message `'Error: socket hang up'` and code + `'ECONNRESET'` +* `'close'` + +In the case of a premature connection close after the response is received, +the following events will be emitted in the following order: + +* `'socket'` +* `'response'` + * `'data'` any number of times, on the `res` object +* (connection closed here) +* `'aborted'` on the `res` object +* `'close'` +* `'close'` on the `res` object + If `req.abort()` is called before the connection succeeds, the following events will be emitted in the following order: @@ -2272,7 +2291,6 @@ will be emitted in the following order: * `'abort'` * `'aborted'` on the `res` object * `'close'` -* `'end'` on the `res` object * `'close'` on the `res` object Setting the `timeout` option or using the `setTimeout()` function will |