@@ -71047,7 +71047,7 @@ module.exports = {
71047
71047
71048
71048
71049
71049
const { parseSetCookie } = __nccwpck_require__(4408)
71050
- const { stringify, getHeadersList } = __nccwpck_require__(3121)
71050
+ const { stringify } = __nccwpck_require__(3121)
71051
71051
const { webidl } = __nccwpck_require__(1744)
71052
71052
const { Headers } = __nccwpck_require__(554)
71053
71053
@@ -71123,14 +71123,13 @@ function getSetCookies (headers) {
71123
71123
71124
71124
webidl.brandCheck(headers, Headers, { strict: false })
71125
71125
71126
- const cookies = getHeadersList( headers).cookies
71126
+ const cookies = headers.getSetCookie()
71127
71127
71128
71128
if (!cookies) {
71129
71129
return []
71130
71130
}
71131
71131
71132
- // In older versions of undici, cookies is a list of name:value.
71133
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
71132
+ return cookies.map((pair) => parseSetCookie(pair))
71134
71133
}
71135
71134
71136
71135
/**
@@ -71558,14 +71557,15 @@ module.exports = {
71558
71557
/***/ }),
71559
71558
71560
71559
/***/ 3121:
71561
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
71560
+ /***/ ((module) => {
71562
71561
71563
71562
"use strict";
71564
71563
71565
71564
71566
- const assert = __nccwpck_require__(9491)
71567
- const { kHeadersList } = __nccwpck_require__(2785)
71568
-
71565
+ /**
71566
+ * @param {string} value
71567
+ * @returns {boolean}
71568
+ */
71569
71569
function isCTLExcludingHtab (value) {
71570
71570
if (value.length === 0) {
71571
71571
return false
@@ -71826,31 +71826,13 @@ function stringify (cookie) {
71826
71826
return out.join('; ')
71827
71827
}
71828
71828
71829
- let kHeadersListNode
71830
-
71831
- function getHeadersList (headers) {
71832
- if (headers[kHeadersList]) {
71833
- return headers[kHeadersList]
71834
- }
71835
-
71836
- if (!kHeadersListNode) {
71837
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
71838
- (symbol) => symbol.description === 'headers list'
71839
- )
71840
-
71841
- assert(kHeadersListNode, 'Headers cannot be parsed')
71842
- }
71843
-
71844
- const headersList = headers[kHeadersListNode]
71845
- assert(headersList)
71846
-
71847
- return headersList
71848
- }
71849
-
71850
71829
module.exports = {
71851
71830
isCTLExcludingHtab,
71852
- stringify,
71853
- getHeadersList
71831
+ validateCookieName,
71832
+ validateCookiePath,
71833
+ validateCookieValue,
71834
+ toIMFDate,
71835
+ stringify
71854
71836
}
71855
71837
71856
71838
@@ -75854,6 +75836,7 @@ const {
75854
75836
isValidHeaderName,
75855
75837
isValidHeaderValue
75856
75838
} = __nccwpck_require__(2538)
75839
+ const util = __nccwpck_require__(3837)
75857
75840
const { webidl } = __nccwpck_require__(1744)
75858
75841
const assert = __nccwpck_require__(9491)
75859
75842
@@ -76407,6 +76390,9 @@ Object.defineProperties(Headers.prototype, {
76407
76390
[Symbol.toStringTag]: {
76408
76391
value: 'Headers',
76409
76392
configurable: true
76393
+ },
76394
+ [util.inspect.custom]: {
76395
+ enumerable: false
76410
76396
}
76411
76397
})
76412
76398
@@ -85583,6 +85569,20 @@ class Pool extends PoolBase {
85583
85569
? { ...options.interceptors }
85584
85570
: undefined
85585
85571
this[kFactory] = factory
85572
+
85573
+ this.on('connectionError', (origin, targets, error) => {
85574
+ // If a connection error occurs, we remove the client from the pool,
85575
+ // and emit a connectionError event. They will not be re-used.
85576
+ // Fixes https://github.com/nodejs/undici/issues/3895
85577
+ for (const target of targets) {
85578
+ // Do not use kRemoveClient here, as it will close the client,
85579
+ // but the client cannot be closed in this state.
85580
+ const idx = this[kClients].indexOf(target)
85581
+ if (idx !== -1) {
85582
+ this[kClients].splice(idx, 1)
85583
+ }
85584
+ }
85585
+ })
85586
85586
}
85587
85587
85588
85588
[kGetDispatcher] () {
0 commit comments