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 danielleadams committed Jan 12, 2021
1 parent eb6b386 commit 651e7d2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1892,6 +1892,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 @@ -1906,6 +1910,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 651e7d2

Please sign in to comment.