Skip to content

Commit

Permalink
doc: add doc-only deprecation for headers/trailers setters
Browse files Browse the repository at this point in the history
The headers and trailers for http.IncomingMessage will be read-only in a
future version of Node.js.

Ref: #45571
PR-URL: #45697
Refs: #45571
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott authored and targos committed Dec 12, 2022
1 parent 418ae9b commit 9f51b9e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -3308,6 +3308,22 @@ Type: Documentation-only
might result in host name spoofing with unexpected input. These URLs will throw
an error in future versions of Node.js, as the [WHATWG URL API][] does already.

### DEP0171: Setters for `http.IncomingMessage` headers and trailers

<!-- YAML
changes:
- version:
- REPLACEME
pr-url: https://github.com/nodejs/node/pull/45697
description: Documentation-only deprecation.
-->

Type: Documentation-only

In a future version of Node.js, [`message.headers`][],
[`message.headersDistinct`][], [`message.trailers`][], and
[`message.trailersDistinct`][] will be read-only.

[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4
Expand Down Expand Up @@ -3384,7 +3400,11 @@ an error in future versions of Node.js, as the [WHATWG URL API][] does already.
[`https.get()`]: https.md#httpsgetoptions-callback
[`https.request()`]: https.md#httpsrequestoptions-callback
[`message.connection`]: http.md#messageconnection
[`message.headersDistinct`]: http.md#messageheadersdistinct
[`message.headers`]: http.md#messageheaders
[`message.socket`]: http.md#messagesocket
[`message.trailersDistinct`]: http.md#messagetrailersdistinct
[`message.trailers`]: http.md#messagetrailers
[`module.createRequire()`]: module.md#modulecreaterequirefilename
[`os.networkInterfaces()`]: os.md#osnetworkinterfaces
[`os.tmpdir()`]: os.md#ostmpdir
Expand Down

0 comments on commit 9f51b9e

Please sign in to comment.