Skip to content

Commit

Permalink
docs,lib: fix typo in meaning of idempotent option (nodejs#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
tniessen authored and crysmags committed Feb 27, 2024
1 parent 628b757 commit 1c60f4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/api/Dispatcher.md
Expand Up @@ -196,7 +196,7 @@ Returns: `void`
* **method** `string`
* **body** `string | Buffer | Uint8Array | stream.Readable | null` (optional) - Default: `null`
* **headers** `UndiciHeaders` (optional) - Default: `null`
* **idempotent** `boolean` (optional) - Default: `true` if `method` is `'HEAD'` or `'GET'` - Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceeding requests in the pipeline has completed.
* **idempotent** `boolean` (optional) - Default: `true` if `method` is `'HEAD'` or `'GET'` - Whether the requests can be safely retried or not. If `false` the request won't be sent until all preceding requests in the pipeline has completed.
* **upgrade** `string | null` (optional) - Default: `null` - Upgrade the request. Should be used to specify the kind of upgrade i.e. `'Websocket'`.

#### Parameter: `DispatchHandlers`
Expand Down
2 changes: 1 addition & 1 deletion lib/client.js
Expand Up @@ -1151,7 +1151,7 @@ function _resume (client, sync) {
}

if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {
// Don't dispatch an upgrade until all preceeding requests have completed.
// Don't dispatch an upgrade until all preceding requests have completed.
// A misbehaving server might upgrade the connection before all pipelined
// request has completed.
return
Expand Down

0 comments on commit 1c60f4e

Please sign in to comment.