Skip to content

Commit 2d9ae4f

Browse files
mcollinarichardlau
authored andcommittedFeb 15, 2023
deps: update undici to v5.19.1
Signed-off-by: Matteo Collina <hello@matteocollina.com> CVE-ID: CVE-2023-23936, CVE-2023-24807 PR-URL: nodejs-private/node-private#388 Refs: GHSA-5r9g-qh6m-jxff Refs: GHSA-r6ch-mqf9-qc9w Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1820955 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1784449 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent b558e9f commit 2d9ae4f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+7822
-7122
lines changed
 

‎deps/undici/src/README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ Implements [fetch](https://fetch.spec.whatwg.org/#fetch-method).
178178

179179
Only supported on Node 16.8+.
180180

181-
This is [experimental](https://nodejs.org/api/documentation.html#documentation_stability_index) and is not yet fully compliant with the Fetch Standard.
182-
We plan to ship breaking changes to this feature until it is out of experimental.
183-
Help us improve the test coverage by following instructions at [nodejs/undici/#951](https://github.com/nodejs/undici/issues/951).
184-
185181
Basic usage example:
186182

187183
```js
@@ -234,9 +230,15 @@ const data = {
234230
},
235231
}
236232

237-
await fetch('https://example.com', { body: data, method: 'POST' })
233+
await fetch('https://example.com', { body: data, method: 'POST', duplex: 'half' })
238234
```
239235

236+
#### `request.duplex`
237+
238+
- half
239+
240+
In this implementation of fetch, `request.duplex` must be set if `request.body` is `ReadableStream` or `Async Iterables`. And fetch requests are currently always be full duplex. More detail refer to [Fetch Standard.](https://fetch.spec.whatwg.org/#dom-requestinit-duplex)
241+
240242
#### `response.body`
241243

242244
Nodejs has two kinds of streams: [web streams](https://nodejs.org/dist/latest-v16.x/docs/api/webstreams.html), which follow the API of the WHATWG web standard found in browsers, and an older Node-specific [streams API](https://nodejs.org/api/stream.html). `response.body` returns a readable web stream. If you would prefer to work with a Node stream you can convert a web stream using `.fromWeb()`.

‎deps/undici/src/docs/api/Client.md

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Furthermore, the following options can be passed:
3838
* **maxCachedSessions** `number | null` (optional) - Default: `100` - Maximum number of TLS cached sessions. Use 0 to disable TLS session caching. Default: 100.
3939
* **timeout** `number | null` (optional) - Default `10e3`
4040
* **servername** `string | null` (optional)
41+
* **keepAlive** `boolean | null` (optional) - Default: `true` - TCP keep-alive enabled
42+
* **keepAliveInitialDelay** `number | null` (optional) - Default: `60000` - TCP keep-alive interval for the socket in milliseconds
4143

4244
### Example - Basic Client instantiation
4345

0 commit comments

Comments
 (0)
Please sign in to comment.