Skip to content

Commit 8000640

Browse files
authored
Merge branch 'master' into retries
2 parents cdaa771 + fc55fa3 commit 8000640

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

dist/index.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -92167,7 +92167,7 @@ module.exports = {
9216792167

9216892168

9216992169
const { parseSetCookie } = __nccwpck_require__(8915)
92170-
const { stringify, getHeadersList } = __nccwpck_require__(3834)
92170+
const { stringify } = __nccwpck_require__(3834)
9217192171
const { webidl } = __nccwpck_require__(74222)
9217292172
const { Headers } = __nccwpck_require__(26349)
9217392173

@@ -92243,14 +92243,13 @@ function getSetCookies (headers) {
9224392243

9224492244
webidl.brandCheck(headers, Headers, { strict: false })
9224592245

92246-
const cookies = getHeadersList(headers).cookies
92246+
const cookies = headers.getSetCookie()
9224792247

9224892248
if (!cookies) {
9224992249
return []
9225092250
}
9225192251

92252-
// In older versions of undici, cookies is a list of name:value.
92253-
return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
92252+
return cookies.map((pair) => parseSetCookie(pair))
9225492253
}
9225592254

9225692255
/**
@@ -92678,14 +92677,15 @@ module.exports = {
9267892677
/***/ }),
9267992678

9268092679
/***/ 3834:
92681-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
92680+
/***/ ((module) => {
9268292681

9268392682
"use strict";
9268492683

9268592684

92686-
const assert = __nccwpck_require__(42613)
92687-
const { kHeadersList } = __nccwpck_require__(36443)
92688-
92685+
/**
92686+
* @param {string} value
92687+
* @returns {boolean}
92688+
*/
9268992689
function isCTLExcludingHtab (value) {
9269092690
if (value.length === 0) {
9269192691
return false
@@ -92946,31 +92946,13 @@ function stringify (cookie) {
9294692946
return out.join('; ')
9294792947
}
9294892948

92949-
let kHeadersListNode
92950-
92951-
function getHeadersList (headers) {
92952-
if (headers[kHeadersList]) {
92953-
return headers[kHeadersList]
92954-
}
92955-
92956-
if (!kHeadersListNode) {
92957-
kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
92958-
(symbol) => symbol.description === 'headers list'
92959-
)
92960-
92961-
assert(kHeadersListNode, 'Headers cannot be parsed')
92962-
}
92963-
92964-
const headersList = headers[kHeadersListNode]
92965-
assert(headersList)
92966-
92967-
return headersList
92968-
}
92969-
9297092949
module.exports = {
9297192950
isCTLExcludingHtab,
92972-
stringify,
92973-
getHeadersList
92951+
validateCookieName,
92952+
validateCookiePath,
92953+
validateCookieValue,
92954+
toIMFDate,
92955+
stringify
9297492956
}
9297592957

9297692958

@@ -96974,6 +96956,7 @@ const {
9697496956
isValidHeaderName,
9697596957
isValidHeaderValue
9697696958
} = __nccwpck_require__(15523)
96959+
const util = __nccwpck_require__(39023)
9697796960
const { webidl } = __nccwpck_require__(74222)
9697896961
const assert = __nccwpck_require__(42613)
9697996962

@@ -97527,6 +97510,9 @@ Object.defineProperties(Headers.prototype, {
9752797510
[Symbol.toStringTag]: {
9752897511
value: 'Headers',
9752997512
configurable: true
97513+
},
97514+
[util.inspect.custom]: {
97515+
enumerable: false
9753097516
}
9753197517
})
9753297518

@@ -106703,6 +106689,20 @@ class Pool extends PoolBase {
106703106689
? { ...options.interceptors }
106704106690
: undefined
106705106691
this[kFactory] = factory
106692+
106693+
this.on('connectionError', (origin, targets, error) => {
106694+
// If a connection error occurs, we remove the client from the pool,
106695+
// and emit a connectionError event. They will not be re-used.
106696+
// Fixes https://github.com/nodejs/undici/issues/3895
106697+
for (const target of targets) {
106698+
// Do not use kRemoveClient here, as it will close the client,
106699+
// but the client cannot be closed in this state.
106700+
const idx = this[kClients].indexOf(target)
106701+
if (idx !== -1) {
106702+
this[kClients].splice(idx, 1)
106703+
}
106704+
}
106705+
})
106706106706
}
106707106707

106708106708
[kGetDispatcher] () {

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)