Antoine du Hamel
b98ada27e7
doc: fix linter issues
...
PR-URL: https://github.com/nodejs/node/pull/60636
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2025-11-08 17:09:29 +00:00
JaeHo Jang
1727a8f1b2
doc: improve agent.createConnection docs for http and https agents
...
PR-URL: https://github.com/nodejs/node/pull/58205
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: James M Snell <jasnell@gmail.com >
2025-11-08 14:34:58 +00:00
Koushil Mankali
ca91969808
doc: add missing variable in code snippet
...
`node:http`' `request.reusedSocket` documentation sample code was
referencing an undeclared `agent` identifier.
PR-URL: https://github.com/nodejs/node/pull/55478
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-11-08 15:24:11 +01:00
Michael Solomon
f4145f0451
doc: fix typo in http.md
...
PR-URL: https://github.com/nodejs/node/pull/59354
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: theanarkh <theratliter@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-11-04 22:37:12 +00:00
Tim Perry
4346c0f7a7
http: fix handling of HTTP upgrades with bodies
...
Previously, we ignored all indicators of the body (content-length or
transfer-encoding headers) and treated any information following
the headers as part of the upgraded stream. We now fully process the
requests bodies separately instead, allowing us to automatically handle
correct parsing of the body like any other HTTP request.
This is a breaking change if you are currently accepting HTTP Upgrade
requests with request bodies successfully, or if you use
socket-specific fields & methods on the upgraded stream argument.
In the former case, before now you will have received the request body
and then the upgraded data on the same stream without any distinction
or HTTP parsing applied. Now, you will need to separately read the
request body from the request (the 1st argument) and the upgraded
data from the upgrade stream (the 2nd argument). If you're not
interested in request bodies, you can continue to just read from the
upgrade stream directly.
In the latter case, if you want to access the raw socket, you should do
so via request.socket, instead of expecting the 2nd argument to be a
socket.
PR-URL: https://github.com/nodejs/node/pull/60016
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2025-11-03 17:19:33 +00:00
Antoine du Hamel
f1d8634179
2025-10-28, Version 25.1.0 (Current)
...
Notable changes:
http:
* (SEMVER-MINOR) add optimizeEmptyRequests server option (Rafael Gonzaga) https://github.com/nodejs/node/pull/59778
sqlite:
* (SEMVER-MINOR) allow setting defensive flag (Bart Louwers) https://github.com/nodejs/node/pull/60217
src:
* (SEMVER-MINOR) add watch config namespace (Marco Ippolito) https://github.com/nodejs/node/pull/60178
PR-URL: https://github.com/nodejs/node/pull/60436
2025-10-28 20:03:00 +01:00
Antoine du Hamel
b9dedf416b
2025-10-20, Version 22.21.0 'Jod' (LTS)
...
Notable changes:
cli:
* (SEMVER-MINOR) add `--use-env-proxy` (Joyee Cheung) https://github.com/nodejs/node/pull/59151
http:
* (SEMVER-MINOR) support http proxy for fetch under `NODE_USE_ENV_PROXY` (Joyee Cheung) https://github.com/nodejs/node/pull/57165
* (SEMVER-MINOR) add `shouldUpgradeCallback` to let servers control HTTP upgrades (Tim Perry) https://github.com/nodejs/node/pull/59824
http,https:
* (SEMVER-MINOR) add built-in proxy support in `http`/`https.request` and `Agent` (Joyee Cheung) https://github.com/nodejs/node/pull/58980
src:
* (SEMVER-MINOR) add percentage support to `--max-old-space-size` (Asaf Federman) https://github.com/nodejs/node/pull/59082
PR-URL: https://github.com/nodejs/node/pull/60230
2025-10-21 01:45:50 +02:00
Rafael Gonzaga
0c35aaf55f
http: add optimizeEmptyRequests server option
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
Co-Authored-By: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/59778
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2025-10-14 12:17:53 +00:00
Node.js GitHub Bot
ce72fccc9d
2025-09-25, Version 24.9.0 (Current)
...
Notable changes:
http:
* (SEMVER-MINOR) add shouldUpgradeCallback to let servers control HTTP upgrades (Tim Perry) https://github.com/nodejs/node/pull/59824
sqlite:
* (SEMVER-MINOR) cleanup ERM support and export Session class (James M Snell) https://github.com/nodejs/node/pull/58378
* (SEMVER-MINOR) add tagged template (0hm☘️ ) https://github.com/nodejs/node/pull/58748
worker:
* (SEMVER-MINOR) add heap profile API (theanarkh) https://github.com/nodejs/node/pull/59846
PR-URL: https://github.com/nodejs/node/pull/59997
2025-09-25 21:40:51 +02:00
Node.js GitHub Bot
f5e2ecc41b
2025-09-24, Version 22.20.0 'Jod' (LTS)
...
Notable changes:
crypto:
* update root certificates to NSS 3.114 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59571
deps:
* fix OpenSSL security level at 1 (Richard Lau) https://github.com/nodejs/node/pull/59859
* upgrade openssl sources to openssl-3.5.2 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59371
doc:
* stabilize --disable-sigusr1 (Rafael Gonzaga) https://github.com/nodejs/node/pull/59707
* mark `path.matchesGlob` as stable (Aviv Keller) https://github.com/nodejs/node/pull/59572
http:
* (SEMVER-MINOR) add Agent.agentKeepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59315
http2:
* (SEMVER-MINOR) add support for raw header arrays in h2Stream.respond() (Tim Perry) https://github.com/nodejs/node/pull/59455
inspector:
* add http2 tracking support (Darshan Sen) https://github.com/nodejs/node/pull/59611
sea:
* (SEMVER-MINOR) implement execArgvExtension (Joyee Cheung) https://github.com/nodejs/node/pull/59560
* (SEMVER-MINOR) support execArgv in sea config (Joyee Cheung) https://github.com/nodejs/node/pull/59314
stream:
* (SEMVER-MINOR) add brotli support to CompressionStream and DecompressionStream (Matthew Aitken) https://github.com/nodejs/node/pull/59464
test_runner:
* (SEMVER-MINOR) support object property mocking (Idan Goshen) https://github.com/nodejs/node/pull/58438
worker:
* (SEMVER-MINOR) add cpu profile APIs for worker (theanarkh) https://github.com/nodejs/node/pull/59428
PR-URL: https://github.com/nodejs/node/pull/59973
2025-09-24 13:04:16 +00:00
Tim Perry
65bee02cca
http: add shouldUpgradeCallback to let servers control HTTP upgrades
...
Previously, you could either add no 'upgrade' event handler, in which
case all upgrades were ignored, or add an 'upgrade' handler and all
upgrade attempts would effectively succeed and skip normal request
handling. This change adds a new shouldUpgradeCallback option to HTTP
servers, which receives the request details and returns a boolean that
controls whether the request should be upgraded.
PR-URL: https://github.com/nodejs/node/pull/59824
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-09-17 15:14:01 +00:00
yusheng chen
85db70b2cf
doc: type improvement of file http.md
...
`outgoingMessage.setHeader` and `outgoingMessage.getHeader` section
PR-URL: https://github.com/nodejs/node/pull/58189
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2025-09-14 00:39:24 +00:00
Node.js GitHub Bot
fba8e6ab4a
2025-08-28, Version 22.19.0 'Jod' (LTS)
...
Notable changes:
cli:
* (SEMVER-MINOR) add NODE_USE_SYSTEM_CA=1 (Joyee Cheung) https://github.com/nodejs/node/pull/59276
* (SEMVER-MINOR) support `${pid}` placeholder in --cpu-prof-name (Haram Jeong) https://github.com/nodejs/node/pull/59072
crypto:
* (SEMVER-MINOR) add tls.setDefaultCACertificates() (Joyee Cheung) https://github.com/nodejs/node/pull/58822
dns:
* (SEMVER-MINOR) support max timeout (theanarkh) https://github.com/nodejs/node/pull/58440
doc:
* update the instruction on how to verify releases (Antoine du Hamel) https://github.com/nodejs/node/pull/59113
esm:
* (SEMVER-MINOR) unflag --experimental-wasm-modules (Guy Bedford) https://github.com/nodejs/node/pull/57038
http:
* (SEMVER-MINOR) add server.keepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59243
lib:
* docs deprecate _http_* (Sebastian Beltran) https://github.com/nodejs/node/pull/59293
net:
* (SEMVER-MINOR) update net.blocklist to allow file save and file management (alphaleadership) https://github.com/nodejs/node/pull/58087
process:
* (SEMVER-MINOR) add threadCpuUsage (Paolo Insogna) https://github.com/nodejs/node/pull/56467
zlib:
* (SEMVER-MINOR) add dictionary support to zstdCompress and zstdDecompress (lluisemper) https://github.com/nodejs/node/pull/59240
PR-URL: https://github.com/nodejs/node/pull/59641
2025-08-28 23:08:02 +02:00
Node.js GitHub Bot
d3ac95e6a8
2025-08-27, Version 24.7.0 (Current)
...
Notable changes:
crypto:
* update root certificates to NSS 3.114 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59571
* (SEMVER-MINOR) add AES-OCB Web Cryptography algorithm (Filip Skokan) https://github.com/nodejs/node/pull/59539
* (SEMVER-MINOR) support ML-KEM in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59569
* (SEMVER-MINOR) support ML-KEM, DHKEM, and RSASVE key encapsulation mechanisms (Filip Skokan) https://github.com/nodejs/node/pull/59491
* (SEMVER-MINOR) add argon2() and argon2Sync() methods (Ranieri Althoff) https://github.com/nodejs/node/pull/50353
* (SEMVER-MINOR) support ML-DSA spki/pkcs8 key formats in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) add ChaCha20-Poly1305 Web Cryptography algorithm (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) add subtle.getPublicKey() utility function in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) add SHA-3 Web Cryptography digest algorithms (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) add SHAKE Web Cryptography digest algorithms (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) add SubtleCrypto.supports feature detection in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) support ML-DSA in Web Cryptography (Filip Skokan) https://github.com/nodejs/node/pull/59365
* (SEMVER-MINOR) support ML-KEM KeyObject (Filip Skokan) https://github.com/nodejs/node/pull/59461
http:
* (SEMVER-MINOR) add Agent.agentKeepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59315
http2:
* (SEMVER-MINOR) add support for raw header arrays in h2Stream.respond() (Tim Perry) https://github.com/nodejs/node/pull/59455
sea:
* (SEMVER-MINOR) support execArgv in sea config (Joyee Cheung) https://github.com/nodejs/node/pull/59314
stream:
* (SEMVER-MINOR) add brotli support to CompressionStream and DecompressionStream (Matthew Aitken) https://github.com/nodejs/node/pull/59464
PR-URL: https://github.com/nodejs/node/pull/59629
2025-08-27 23:16:17 +02:00
Alexander Makarenko
2894849284
doc: fix missing link to the Error documentation in the http page
...
PR-URL: https://github.com/nodejs/node/pull/59080
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
2025-08-27 10:40:48 +00:00
Node.js GitHub Bot
31b6255ae9
2025-08-14, Version 24.6.0 (Current)
...
Notable changes:
cli:
* (SEMVER-MINOR) add NODE_USE_SYSTEM_CA=1 (Joyee Cheung) https://github.com/nodejs/node/pull/59276
crypto:
* (SEMVER-MINOR) support ML-DSA KeyObject, sign, and verify (Filip Skokan) https://github.com/nodejs/node/pull/59259
fs:
* (SEMVER-MINOR) port SonicBoom module to fs module as Utf8Stream (James M Snell) https://github.com/nodejs/node/pull/58897
http:
* (SEMVER-MINOR) add server.keepAliveTimeoutBuffer option (Haram Jeong) https://github.com/nodejs/node/pull/59243
lib:
* docs deprecate _http_* (Sebastian Beltran) https://github.com/nodejs/node/pull/59293
zlib:
* (SEMVER-MINOR) add dictionary support to zstdCompress and zstdDecompress (lluisemper) https://github.com/nodejs/node/pull/59240
PR-URL: https://github.com/nodejs/node/pull/59449
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
2025-08-14 18:03:50 -03:00
Haram Jeong
a4b4eca94c
http: add Agent.agentKeepAliveTimeoutBuffer option
...
PR-URL: https://github.com/nodejs/node/pull/59315
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
2025-08-13 02:32:30 +00:00
Lee Jiho
0309806a74
doc: fix missing reference links for server.keepAliveTimeoutBuffer
...
PR-URL: https://github.com/nodejs/node/pull/59356
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2025-08-07 02:53:30 +00:00
Haram Jeong
f7c2a7ed4a
http: add server.keepAliveTimeoutBuffer option
...
PR-URL: https://github.com/nodejs/node/pull/59243
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jason Zhang <xzha4350@gmail.com >
2025-08-04 13:47:09 +00:00
Antoine du Hamel
c836bd6746
2025-07-31, Version 24.5.0 (Current)
...
Notable changes:
cli:
* (SEMVER-MINOR) support `${pid}` placeholder in `--cpu-prof-name` (Haram Jeong) https://github.com/nodejs/node/pull/59072
crypto:
* (SEMVER-MINOR) add `tls.setDefaultCACertificates()` (Joyee Cheung) https://github.com/nodejs/node/pull/58822
deps:
* upgrade to openssl-3.5.1 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/59234
dns:
* (SEMVER-MINOR) support max timeout (theanarkh) https://github.com/nodejs/node/pull/58440
doc:
* update the instruction on how to verify releases (Antoine du Hamel) https://github.com/nodejs/node/pull/59113
esm:
* (SEMVER-MINOR) unflag `--experimental-wasm-modules` (Guy Bedford) https://github.com/nodejs/node/pull/57038
http,https:
* (SEMVER-MINOR) add built-in proxy support in http/https.request and `Agent` (Joyee Cheung) https://github.com/nodejs/node/pull/58980
net:
* (SEMVER-MINOR) update net.blocklist to allow file save and file management (alphaleadership) https://github.com/nodejs/node/pull/58087
test:
* (SEMVER-MINOR) move http proxy tests to test/client-proxy (Joyee Cheung) https://github.com/nodejs/node/pull/58980
worker:
* (SEMVER-MINOR) add web locks api (ishabi) https://github.com/nodejs/node/pull/58666
PR-URL: https://github.com/nodejs/node/pull/59257
2025-07-31 23:44:19 +02:00
Joyee Cheung
0259df9faf
cli: add --use-env-proxy
...
This does the same as NODE_USE_ENV_PROXY. When both are set,
like other options that can be configured from both sides,
the CLI flag takes precedence.
PR-URL: https://github.com/nodejs/node/pull/59151
Fixes: https://github.com/nodejs/node/issues/59100
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-07-26 20:43:10 +00:00
Joyee Cheung
036b1fd66d
http,https: add built-in proxy support in http/https.request and Agent
...
This patch implements proxy support for HTTP and HTTPS clients and
agents in the `http` and `https` built-ins`. When NODE_USE_ENV_PROXY
is set to 1, the default global agent would parse the
HTTP_PROXY/http_proxy, HTTPS_PROXY/https_proxy, NO_PROXY/no_proxy
settings from the environment variables, and proxy the requests
sent through the built-in http/https client accordingly.
To support this, `http.Agent` and `https.Agent` now accept a few new
options:
- `proxyEnv`: when it's an object, the agent would read and parse
the HTTP_PROXY/http_proxy, HTTPS_PROXY/https_proxy, NO_PROXY/no_proxy
properties from it, and apply them based on the protocol it uses
to send requests. This option allows custom agents to
reuse built-in proxy support by composing options. Global agents
set this to `process.env` when NODE_USE_ENV_PROXY is 1.
- `defaultPort` and `protocol`: these allow setting of the default port
and protocol of the agents. We also need these when configuring
proxy settings and deciding whether a request should be proxied.
Implementation-wise, this adds a `ProxyConfig` internal class to handle
parsing and application of proxy configurations. The configuration
is parsed during agent construction. When requests are made,
the `createConnection()` methods on the agents would check whether
the request should be proxied. If yes, they either connect to the
proxy server (in the case of HTTP reqeusts) or establish a tunnel
(in the case of HTTPS requests) through either a TCP socket (if the
proxy uses HTTP) or a TLS socket (if the proxy uses HTTPS).
When proxying HTTPS requests through a tunnel, the connection listener
is invoked after the tunnel is established. Tunnel establishment uses
the timeout of the request options, if there is one. Otherwise it uses
the timeout of the agent.
If an error is encountered during tunnel establishment, an
ERR_PROXY_TUNNEL would be emitted on the returned socket. If the proxy
server sends a errored status code, the error would contain an
`statusCode` property. If the error is caused by timeout, the error
would contain a `proxyTunnelTimeout` property.
This implementation honors the built-in socket pool and socket limits.
Pooled sockets are still keyed by request endpoints, they are just
connected to the proxy server instead, and the persistence of the
connection can be maintained as long as the proxy server respects
connection/proxy-connection or persist by default (HTTP/1.1)
PR-URL: https://github.com/nodejs/node/pull/58980
Refs: https://github.com/nodejs/node/issues/57872
Refs: https://github.com/nodejs/node/issues/8381
Refs: https://github.com/nodejs/node/issues/15620
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2025-07-18 09:06:32 +02:00
Aviv Keller
4102dcc226
doc: fix typed list formatting
...
PR-URL: https://github.com/nodejs/node/pull/59019
Refs: https://github.com/nodejs/api-docs-tooling/issues/348
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Claudio Wunder <cwunder@gnome.org >
2025-07-15 17:18:42 +00:00
Antoine du Hamel
9501c868d4
doc: add missing Class: mentions
...
PR-URL: https://github.com/nodejs/node/pull/58931
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2025-07-04 16:29:39 +00:00
Antoine du Hamel
1d08014dc1
tools,doc: move more MDN links to types
...
PR-URL: https://github.com/nodejs/node/pull/58930
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Claudio Wunder <cwunder@gnome.org >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-07-04 16:14:26 +00:00
Michael Henrique
db8ca623d4
doc: add array type in http request headers
...
Document that the headers option in http.request() can be either an
object or an array of strings, similar to message.rawHeaders.
PR-URL: https://github.com/nodejs/node/pull/58049
Fixes: https://github.com/nodejs/node/issues/57986
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-06-27 13:14:37 +00:00
Node.js GitHub Bot
fe4aa9c502
2025-06-09, Version 24.2.0 (Current)
...
Notable changes:
doc:
* add Filip Skokan to TSC (Rafael Gonzaga) https://github.com/nodejs/node/pull/58499
* deprecate `util.isNativeError` in favor of `Error.isError` (Miguel Marcondes Filho) https://github.com/nodejs/node/pull/58262
* deprecate passing an empty string to `options.shell` (Antoine du Hamel) https://github.com/nodejs/node/pull/58564
* deprecate HTTP/2 priority signaling (Matteo Collina) https://github.com/nodejs/node/pull/58313
* (SEMVER-MINOR) graduate `Symbol.dispose`/`asyncDispose` from experimental (James M Snell) https://github.com/nodejs/node/pull/58467
esm:
* (SEMVER-MINOR) implement import.meta.main (Joe) https://github.com/nodejs/node/pull/57804
fs:
* (SEMVER-MINOR) add `autoClose` option to `FileHandle` `readableWebStream` (James M Snell) https://github.com/nodejs/node/pull/58548
http:
* deprecate instantiating classes without new (Yagiz Nizipli) https://github.com/nodejs/node/pull/58518
http2:
* (SEMVER-MINOR) add diagnostics channel 'http2.server.stream.finish' (Darshan Sen) https://github.com/nodejs/node/pull/58560
* (SEMVER-MAJOR) remove support for priority signaling (Matteo Collina) https://github.com/nodejs/node/pull/58293
lib:
* (SEMVER-MINOR) graduate error codes that have been around for years (James M Snell) https://github.com/nodejs/node/pull/58541
perf_hooks:
* (SEMVER-MINOR) make event loop delay histogram disposable (James M Snell) https://github.com/nodejs/node/pull/58384
src:
* (SEMVER-MINOR) support namespace options in configuration file (Pietro Marchini) https://github.com/nodejs/node/pull/58073
permission:
* implicit allow-fs-read to app entrypoint (Rafael Gonzaga) https://github.com/nodejs/node/pull/58579
test:
* (SEMVER-MINOR) add disposable histogram test (James M Snell) https://github.com/nodejs/node/pull/58384
* (SEMVER-MINOR) add test for async disposable worker thread (James M Snell) https://github.com/nodejs/node/pull/58385
util:
* (SEMVER-MINOR) add 'none' style to styleText (James M Snell) https://github.com/nodejs/node/pull/58437
worker:
* (SEMVER-MINOR) make Worker async disposable (James M Snell) https://github.com/nodejs/node/pull/58385
PR-URL: https://github.com/nodejs/node/pull/58635
2025-06-09 23:45:29 +02:00
James M Snell
ba6651ab4f
doc: graduate Symbol.dispose/asyncDispose from experimental
...
Now that Symbol.dispose and Symbol.asyncDispose have been
enabled by default and are expected to likely advance to
stage 4 this week, let's graduate them from experimental
status.
PR-URL: https://github.com/nodejs/node/pull/58467
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Dario Piotrowicz <dario.piotrowicz@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-05-28 09:51:25 -07:00
yusheng chen
917600c502
doc: fix typo of file http.md, outgoingMessage.setTimeout section
...
PR-URL: https://github.com/nodejs/node/pull/58188
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
2025-05-11 14:53:14 +00:00
Chengzhong Wu
316014d172
doc: update websocket link to avoid linking to self
...
The link `WebSocket` is pointing to the section itself.
PR-URL: https://github.com/nodejs/node/pull/56897
Reviewed-By: Tim Perry <pimterry@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
2025-02-05 11:01:18 +00:00
Tim Perry
7a40aa75a5
http: add setDefaultHeaders option to http.request
...
This makes it possible to disable the various default headers directly
from the constructor. While this is possible for many use cases by
manually calling removeHeader on the request object instead, when
passing a raw header array to the request constructor the headers are
serialized and prepared to send immediately, and removeHeader cannot
subsequently be used.
With this change, it's now possible to 100% control sent request
headers by passing 'setDefaultHeaders: false' and a raw headers array to
http.request.
PR-URL: https://github.com/nodejs/node/pull/56112
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-12-12 16:43:10 +00:00
Jimmy Leung
acd698a5c8
doc: fix the return type of outgoingMessage.setHeaders()
...
The actual implementation returns `outgoingMessage` itself, but not
exactly `http.ServerResponse`.
Refs: https://github.com/nodejs/node/blob/20d8b85d3493bec944de541a896e0165dd356345/lib/_http_outgoing.js#L712-L751
PR-URL: https://github.com/nodejs/node/pull/55290
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Qingyu Deng <i@ayase-lab.com >
2024-10-11 13:03:35 +00:00
Antoine du Hamel
db1c2beae6
2024-07-17, Version 22.5.0 (Current)
...
Notable changes:
http:
* (SEMVER-MINOR) expose websockets (Natalia Venditto) https://github.com/nodejs/node/pull/53721
lib:
* (SEMVER-MINOR) add `node:sqlite` module (Colin Ihrig) https://github.com/nodejs/node/pull/53752
module:
* add `__esModule` to `require()`'d ESM (Joyee Cheung) https://github.com/nodejs/node/pull/52166
path:
* (SEMVER-MINOR) add `matchesGlob` method (Aviv Keller) https://github.com/nodejs/node/pull/52881
process:
* (SEMVER-MINOR) port on-exit-leak-free to core (Vinicius Lourenço) https://github.com/nodejs/node/pull/53239
stream:
* (SEMVER-MINOR) pipeline wait for close before calling the callback (jakecastelli) https://github.com/nodejs/node/pull/53462
test_runner:
* support glob matching coverage files (Aviv Keller) https://github.com/nodejs/node/pull/53553
worker:
* (SEMVER-MINOR) add `postMessageToThread` (Paolo Insogna) https://github.com/nodejs/node/pull/53682
PR-URL: https://github.com/nodejs/node/pull/53826
2024-07-17 12:11:26 -03:00
Natalia Venditto
a1869fa87e
http: expose websockets
...
PR-URL: https://github.com/nodejs/node/pull/53721
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: James M Snell <jasnell@gmail.com >
2024-07-08 15:55:43 +00:00
Rob Hogan
d7d9278442
doc: note http.closeAllConnections excludes upgraded sockets
...
PR-URL: https://github.com/nodejs/node/pull/53560
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-06-25 10:32:47 +00:00
jakecastelli
521c9c6df7
doc, http: add rejectNonStandardBodyWrites option, clear its behaviour
...
PR-URL: https://github.com/nodejs/node/pull/53396
Fixes: https://github.com/nodejs/node/issues/53035
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2024-06-11 16:39:17 +00:00
Aviv Keller
78485280ca
doc: include ESM import for HTTP
...
PR-URL: https://github.com/nodejs/node/pull/53165
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
2024-05-30 00:46:42 +00:00
mary marchini
938008622c
doc: add examples and notes to http server.close et al
...
Add examples to `http` server.close, server.closeAllConnections,
server.closeIdleConnections. Also add notes about usage for both
server.close*Connections libraries.
PR-URL: https://github.com/nodejs/node/pull/49091
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-05-11 20:41:51 +02:00
461722d64c
doc: correct unsafe URL example in http docs
...
The previous documentation example for converting `request.url` to an
`URL` object was unsafe, as it could allow a server crash through
malformed URL inputs and potentially enable host header attacks.
This commit revises the example to use string concatenation over the
usage of the `baseUrl` and removes the usage of the `req.headers.host`
as the authority part of the url, mitigating both the crash and security
risks by ensuring the host part of the URL remains controlled and
predictable.
Fixes #52494
Co-authored-by: @astlouisf
Co-authored-by: @samhh
PR-URL: https://github.com/nodejs/node/pull/52555
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-04-21 12:56:11 +00:00
Michaël Zasso
ca7c8c6f75
tools: use stylistic ESLint plugin for formatting
...
Refs: https://eslint.org/blog/2023/10/deprecating-formatting-rules/
PR-URL: https://github.com/nodejs/node/pull/50714
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2024-04-15 15:08:10 +00:00
mathis-west-1
655b327a4d
doc: call out http(s).globalAgent default
...
Despite the `http.Agent` stating:
> The default `http.globalAgent` that is used by `http.request()` has
> all of these values set to their respective defaults.
this isn't true anymore since node.js 19. Both, the http as well as the
https `globalAgent` now set `{ keepAlive: true, scheduling: 'lifo',
timeout: 5000 }` as options. `'lifo'` is the default anyway, but
`keepAlive` is turned off and no `timeout` is set on `new Agent()`.
Document the diverging behaviour in the `globalAgent` sections, remove
the false statement from `http.Agent` section, and extend the changelog
to call out the timeout change as well.
PR-URL: https://github.com/nodejs/node/pull/52392
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2024-04-08 20:33:46 +00:00
wh0
8bd3cb2f8c
doc: http event order correction
...
PR-URL: https://github.com/nodejs/node/pull/51464
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-03-25 07:53:58 +00:00
Dmitry Semigradsky
bf39716735
doc: updates for better json generating
...
PR-URL: https://github.com/nodejs/node/pull/51592
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2024-02-13 21:37:42 +00:00
Tim Perry
c25878d370
http2: add h2 compat support for appendHeader
...
PR-URL: https://github.com/nodejs/node/pull/51412
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2024-01-12 16:09:57 +00:00
Antoine du Hamel
5dd7ba66ad
doc: get rid of unnecessary eslint-skip comments
...
PR-URL: https://github.com/nodejs/node/pull/50829
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-11-22 19:03:33 +00:00
Gerhard Stöbich
f4e9a1920e
doc: remove duplicate word
...
PR-URL: https://github.com/nodejs/node/pull/50475
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-10-30 16:44:06 +00:00
Paolo Insogna
e9ff81016d
deps: update llhttp to 9.1.2
...
PR-URL: https://github.com/nodejs/node/pull/48981
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-09-16 11:08:18 +00:00
btea
48c613e5a7
doc: add ESM examples in http.md
...
PR-URL: https://github.com/nodejs/node/pull/47763
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-08-10 14:44:32 +02:00
Matteo Bianchi
8f0f17e1e3
doc: improved joinDuplicateHeaders definition
...
PR-URL: https://github.com/nodejs/node/pull/48859
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-28 10:47:29 +00:00
Guido Penta
36c72c8b2f
doc: improve requireHostHeader
...
PR-URL: https://github.com/nodejs/node/pull/48860
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-07-25 07:19:44 +00:00