Skip to content

Commit a5b43e9

Browse files
dr-jsaduh95
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 <duhamelantoine1995@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
1 parent 34afcc6 commit a5b43e9

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
@@ -1906,6 +1906,10 @@ the request body should be sent.
19061906
<!-- YAML
19071907
added: v0.1.17
19081908
changes:
1909+
- version: v15.5.0
1910+
pr-url: https://github.com/nodejs/node/pull/33035
1911+
description: The `destroyed` value returns `true` after the incoming data
1912+
is consumed.
19091913
- version:
19101914
- v13.1.0
19111915
- v12.16.0
@@ -1920,6 +1924,11 @@ An `IncomingMessage` object is created by [`http.Server`][] or
19201924
and [`'response'`][] event respectively. It may be used to access response
19211925
status, headers and data.
19221926

1927+
Different from it's `socket` value which is a subclass of {stream.Duplex}, the
1928+
`IncomingMessage` itself extends {stream.Readable} and is created separately to
1929+
parse and emit the incoming HTTP headers and payload, as the underlying socket
1930+
may be reused multiple times in case of keep-alive.
1931+
19231932
### Event: `'aborted'`
19241933
<!-- YAML
19251934
added: v0.3.8

0 commit comments

Comments
 (0)