@@ -92994,7 +92994,7 @@ module.exports = {
92994
92994
92995
92995
92996
92996
const { parseSetCookie } = __nccwpck_require__(8915)
92997
- const { stringify, getHeadersList } = __nccwpck_require__(3834)
92997
+ const { stringify } = __nccwpck_require__(3834)
92998
92998
const { webidl } = __nccwpck_require__(74222)
92999
92999
const { Headers } = __nccwpck_require__(26349)
93000
93000
@@ -93070,14 +93070,13 @@ function getSetCookies (headers) {
93070
93070
93071
93071
webidl.brandCheck(headers, Headers, { strict: false })
93072
93072
93073
- const cookies = getHeadersList( headers).cookies
93073
+ const cookies = headers.getSetCookie()
93074
93074
93075
93075
if (!cookies) {
93076
93076
return []
93077
93077
}
93078
93078
93079
- // In older versions of undici, cookies is a list of name:value.
93080
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
93079
+ return cookies.map((pair) => parseSetCookie(pair))
93081
93080
}
93082
93081
93083
93082
/**
@@ -93505,14 +93504,15 @@ module.exports = {
93505
93504
/***/ }),
93506
93505
93507
93506
/***/ 3834:
93508
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
93507
+ /***/ ((module) => {
93509
93508
93510
93509
"use strict";
93511
93510
93512
93511
93513
- const assert = __nccwpck_require__(42613)
93514
- const { kHeadersList } = __nccwpck_require__(36443)
93515
-
93512
+ /**
93513
+ * @param {string} value
93514
+ * @returns {boolean}
93515
+ */
93516
93516
function isCTLExcludingHtab (value) {
93517
93517
if (value.length === 0) {
93518
93518
return false
@@ -93773,31 +93773,13 @@ function stringify (cookie) {
93773
93773
return out.join('; ')
93774
93774
}
93775
93775
93776
- let kHeadersListNode
93777
-
93778
- function getHeadersList (headers) {
93779
- if (headers[kHeadersList]) {
93780
- return headers[kHeadersList]
93781
- }
93782
-
93783
- if (!kHeadersListNode) {
93784
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
93785
- (symbol) => symbol.description === 'headers list'
93786
- )
93787
-
93788
- assert(kHeadersListNode, 'Headers cannot be parsed')
93789
- }
93790
-
93791
- const headersList = headers[kHeadersListNode]
93792
- assert(headersList)
93793
-
93794
- return headersList
93795
- }
93796
-
93797
93776
module.exports = {
93798
93777
isCTLExcludingHtab,
93799
- stringify,
93800
- getHeadersList
93778
+ validateCookieName,
93779
+ validateCookiePath,
93780
+ validateCookieValue,
93781
+ toIMFDate,
93782
+ stringify
93801
93783
}
93802
93784
93803
93785
@@ -97801,6 +97783,7 @@ const {
97801
97783
isValidHeaderName,
97802
97784
isValidHeaderValue
97803
97785
} = __nccwpck_require__(15523)
97786
+ const util = __nccwpck_require__(39023)
97804
97787
const { webidl } = __nccwpck_require__(74222)
97805
97788
const assert = __nccwpck_require__(42613)
97806
97789
@@ -98354,6 +98337,9 @@ Object.defineProperties(Headers.prototype, {
98354
98337
[Symbol.toStringTag]: {
98355
98338
value: 'Headers',
98356
98339
configurable: true
98340
+ },
98341
+ [util.inspect.custom]: {
98342
+ enumerable: false
98357
98343
}
98358
98344
})
98359
98345
@@ -107530,6 +107516,20 @@ class Pool extends PoolBase {
107530
107516
? { ...options.interceptors }
107531
107517
: undefined
107532
107518
this[kFactory] = factory
107519
+
107520
+ this.on('connectionError', (origin, targets, error) => {
107521
+ // If a connection error occurs, we remove the client from the pool,
107522
+ // and emit a connectionError event. They will not be re-used.
107523
+ // Fixes https://github.com/nodejs/undici/issues/3895
107524
+ for (const target of targets) {
107525
+ // Do not use kRemoveClient here, as it will close the client,
107526
+ // but the client cannot be closed in this state.
107527
+ const idx = this[kClients].indexOf(target)
107528
+ if (idx !== -1) {
107529
+ this[kClients].splice(idx, 1)
107530
+ }
107531
+ }
107532
+ })
107533
107533
}
107534
107534
107535
107535
[kGetDispatcher] () {
0 commit comments