Skip to content

Commit 651e7d2

Browse files
dr-jsdanielleadams
authored andcommitted
doc: document http.IncomingMessage behaviour change
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 <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
1 parent eb6b386 commit 651e7d2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/api/http.md

+9
Original file line numberDiff line numberDiff line change
@@ -1892,6 +1892,10 @@ the request body should be sent.
18921892
<!-- YAML
18931893
added: v0.1.17
18941894
changes:
1895+
- version: v15.5.0
1896+
pr-url: https://github.com/nodejs/node/pull/33035
1897+
description: The `destroyed` value returns `true` after the incoming data
1898+
is consumed.
18951899
- version:
18961900
- v13.1.0
18971901
- v12.16.0
@@ -1906,6 +1910,11 @@ An `IncomingMessage` object is created by [`http.Server`][] or
19061910
and [`'response'`][] event respectively. It may be used to access response
19071911
status, headers and data.
19081912

1913+
Different from it's `socket` value which is a subclass of {stream.Duplex}, the
1914+
`IncomingMessage` itself extends {stream.Readable} and is created separately to
1915+
parse and emit the incoming HTTP headers and payload, as the underlying socket
1916+
may be reused multiple times in case of keep-alive.
1917+
19091918
### Event: `'aborted'`
19101919
<!-- YAML
19111920
added: v0.3.8

0 commit comments

Comments
 (0)