@@ -63543,7 +63543,7 @@ module.exports = {
63543
63543
63544
63544
63545
63545
const { parseSetCookie } = __nccwpck_require__(4408)
63546
- const { stringify, getHeadersList } = __nccwpck_require__(3121)
63546
+ const { stringify } = __nccwpck_require__(3121)
63547
63547
const { webidl } = __nccwpck_require__(1744)
63548
63548
const { Headers } = __nccwpck_require__(554)
63549
63549
@@ -63619,14 +63619,13 @@ function getSetCookies (headers) {
63619
63619
63620
63620
webidl.brandCheck(headers, Headers, { strict: false })
63621
63621
63622
- const cookies = getHeadersList( headers).cookies
63622
+ const cookies = headers.getSetCookie()
63623
63623
63624
63624
if (!cookies) {
63625
63625
return []
63626
63626
}
63627
63627
63628
- // In older versions of undici, cookies is a list of name:value.
63629
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
63628
+ return cookies.map((pair) => parseSetCookie(pair))
63630
63629
}
63631
63630
63632
63631
/**
@@ -64054,14 +64053,15 @@ module.exports = {
64054
64053
/***/ }),
64055
64054
64056
64055
/***/ 3121:
64057
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
64056
+ /***/ ((module) => {
64058
64057
64059
64058
"use strict";
64060
64059
64061
64060
64062
- const assert = __nccwpck_require__(9491)
64063
- const { kHeadersList } = __nccwpck_require__(2785)
64064
-
64061
+ /**
64062
+ * @param {string} value
64063
+ * @returns {boolean}
64064
+ */
64065
64065
function isCTLExcludingHtab (value) {
64066
64066
if (value.length === 0) {
64067
64067
return false
@@ -64322,31 +64322,13 @@ function stringify (cookie) {
64322
64322
return out.join('; ')
64323
64323
}
64324
64324
64325
- let kHeadersListNode
64326
-
64327
- function getHeadersList (headers) {
64328
- if (headers[kHeadersList]) {
64329
- return headers[kHeadersList]
64330
- }
64331
-
64332
- if (!kHeadersListNode) {
64333
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
64334
- (symbol) => symbol.description === 'headers list'
64335
- )
64336
-
64337
- assert(kHeadersListNode, 'Headers cannot be parsed')
64338
- }
64339
-
64340
- const headersList = headers[kHeadersListNode]
64341
- assert(headersList)
64342
-
64343
- return headersList
64344
- }
64345
-
64346
64325
module.exports = {
64347
64326
isCTLExcludingHtab,
64348
- stringify,
64349
- getHeadersList
64327
+ validateCookieName,
64328
+ validateCookiePath,
64329
+ validateCookieValue,
64330
+ toIMFDate,
64331
+ stringify
64350
64332
}
64351
64333
64352
64334
@@ -68350,6 +68332,7 @@ const {
68350
68332
isValidHeaderName,
68351
68333
isValidHeaderValue
68352
68334
} = __nccwpck_require__(2538)
68335
+ const util = __nccwpck_require__(3837)
68353
68336
const { webidl } = __nccwpck_require__(1744)
68354
68337
const assert = __nccwpck_require__(9491)
68355
68338
@@ -68903,6 +68886,9 @@ Object.defineProperties(Headers.prototype, {
68903
68886
[Symbol.toStringTag]: {
68904
68887
value: 'Headers',
68905
68888
configurable: true
68889
+ },
68890
+ [util.inspect.custom]: {
68891
+ enumerable: false
68906
68892
}
68907
68893
})
68908
68894
@@ -78079,6 +78065,20 @@ class Pool extends PoolBase {
78079
78065
? { ...options.interceptors }
78080
78066
: undefined
78081
78067
this[kFactory] = factory
78068
+
78069
+ this.on('connectionError', (origin, targets, error) => {
78070
+ // If a connection error occurs, we remove the client from the pool,
78071
+ // and emit a connectionError event. They will not be re-used.
78072
+ // Fixes https://github.com/nodejs/undici/issues/3895
78073
+ for (const target of targets) {
78074
+ // Do not use kRemoveClient here, as it will close the client,
78075
+ // but the client cannot be closed in this state.
78076
+ const idx = this[kClients].indexOf(target)
78077
+ if (idx !== -1) {
78078
+ this[kClients].splice(idx, 1)
78079
+ }
78080
+ }
78081
+ })
78082
78082
}
78083
78083
78084
78084
[kGetDispatcher] () {
0 commit comments