Skip to content

Commit

Permalink
doc: document http.IncomingMessage behaviour change
Browse files Browse the repository at this point in the history
Add to the history table that the `destroyed` value returns `true` after
the incoming data is consumed.

Refs: #36617
Refs: #33035

PR-URL: #36641
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
  • Loading branch information
dr-js authored and aduh95 committed Dec 30, 2020
1 parent 34afcc6 commit a5b43e9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/api/http.md
Expand Up @@ -1906,6 +1906,10 @@ the request body should be sent.
<!-- YAML
added: v0.1.17
changes:
- version: v15.5.0
pr-url: https://github.com/nodejs/node/pull/33035
description: The `destroyed` value returns `true` after the incoming data
is consumed.
- version:
- v13.1.0
- v12.16.0
Expand All @@ -1920,6 +1924,11 @@ An `IncomingMessage` object is created by [`http.Server`][] or
and [`'response'`][] event respectively. It may be used to access response
status, headers and data.

Different from it's `socket` value which is a subclass of {stream.Duplex}, the
`IncomingMessage` itself extends {stream.Readable} and is created separately to
parse and emit the incoming HTTP headers and payload, as the underlying socket
may be reused multiple times in case of keep-alive.

### Event: `'aborted'`
<!-- YAML
added: v0.3.8
Expand Down

0 comments on commit a5b43e9

Please sign in to comment.