@@ -92167,7 +92167,7 @@ module.exports = {
92167
92167
92168
92168
92169
92169
const { parseSetCookie } = __nccwpck_require__(8915)
92170
- const { stringify, getHeadersList } = __nccwpck_require__(3834)
92170
+ const { stringify } = __nccwpck_require__(3834)
92171
92171
const { webidl } = __nccwpck_require__(74222)
92172
92172
const { Headers } = __nccwpck_require__(26349)
92173
92173
@@ -92243,14 +92243,13 @@ function getSetCookies (headers) {
92243
92243
92244
92244
webidl.brandCheck(headers, Headers, { strict: false })
92245
92245
92246
- const cookies = getHeadersList( headers).cookies
92246
+ const cookies = headers.getSetCookie()
92247
92247
92248
92248
if (!cookies) {
92249
92249
return []
92250
92250
}
92251
92251
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))
92254
92253
}
92255
92254
92256
92255
/**
@@ -92678,14 +92677,15 @@ module.exports = {
92678
92677
/***/ }),
92679
92678
92680
92679
/***/ 3834:
92681
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
92680
+ /***/ ((module) => {
92682
92681
92683
92682
"use strict";
92684
92683
92685
92684
92686
- const assert = __nccwpck_require__(42613)
92687
- const { kHeadersList } = __nccwpck_require__(36443)
92688
-
92685
+ /**
92686
+ * @param {string} value
92687
+ * @returns {boolean}
92688
+ */
92689
92689
function isCTLExcludingHtab (value) {
92690
92690
if (value.length === 0) {
92691
92691
return false
@@ -92946,31 +92946,13 @@ function stringify (cookie) {
92946
92946
return out.join('; ')
92947
92947
}
92948
92948
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
-
92970
92949
module.exports = {
92971
92950
isCTLExcludingHtab,
92972
- stringify,
92973
- getHeadersList
92951
+ validateCookieName,
92952
+ validateCookiePath,
92953
+ validateCookieValue,
92954
+ toIMFDate,
92955
+ stringify
92974
92956
}
92975
92957
92976
92958
@@ -96974,6 +96956,7 @@ const {
96974
96956
isValidHeaderName,
96975
96957
isValidHeaderValue
96976
96958
} = __nccwpck_require__(15523)
96959
+ const util = __nccwpck_require__(39023)
96977
96960
const { webidl } = __nccwpck_require__(74222)
96978
96961
const assert = __nccwpck_require__(42613)
96979
96962
@@ -97527,6 +97510,9 @@ Object.defineProperties(Headers.prototype, {
97527
97510
[Symbol.toStringTag]: {
97528
97511
value: 'Headers',
97529
97512
configurable: true
97513
+ },
97514
+ [util.inspect.custom]: {
97515
+ enumerable: false
97530
97516
}
97531
97517
})
97532
97518
@@ -106703,6 +106689,20 @@ class Pool extends PoolBase {
106703
106689
? { ...options.interceptors }
106704
106690
: undefined
106705
106691
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
+ })
106706
106706
}
106707
106707
106708
106708
[kGetDispatcher] () {
0 commit comments