From 8203c021dc4cbd2e74a2fb6aa390a058b7d3b092 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 3 Dec 2022 01:59:49 -0800 Subject: [PATCH] doc: add doc-only deprecation for headers/trailers setters The headers and trailers for http.IncomingMessage will be read-only in a future version of Node.js. Ref: https://github.com/nodejs/node/pull/45571 PR-URL: https://github.com/nodejs/node/pull/45697 Refs: https://github.com/nodejs/node/pull/45571 Reviewed-By: Antoine du Hamel Reviewed-By: Rafael Gonzaga Reviewed-By: Luigi Pinca --- doc/api/deprecations.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 735089f5d903f0..b19ab50cd68b57 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3299,6 +3299,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 + + + +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 @@ -3375,7 +3391,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