@@ -127451,7 +127451,7 @@ module.exports = {
127451
127451
127452
127452
127453
127453
const { parseSetCookie } = __nccwpck_require__(4408)
127454
- const { stringify, getHeadersList } = __nccwpck_require__(3121)
127454
+ const { stringify } = __nccwpck_require__(3121)
127455
127455
const { webidl } = __nccwpck_require__(1744)
127456
127456
const { Headers } = __nccwpck_require__(554)
127457
127457
@@ -127527,14 +127527,13 @@ function getSetCookies (headers) {
127527
127527
127528
127528
webidl.brandCheck(headers, Headers, { strict: false })
127529
127529
127530
- const cookies = getHeadersList( headers).cookies
127530
+ const cookies = headers.getSetCookie()
127531
127531
127532
127532
if (!cookies) {
127533
127533
return []
127534
127534
}
127535
127535
127536
- // In older versions of undici, cookies is a list of name:value.
127537
- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
127536
+ return cookies.map((pair) => parseSetCookie(pair))
127538
127537
}
127539
127538
127540
127539
/**
@@ -127962,14 +127961,15 @@ module.exports = {
127962
127961
/***/ }),
127963
127962
127964
127963
/***/ 3121:
127965
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
127964
+ /***/ ((module) => {
127966
127965
127967
127966
"use strict";
127968
127967
127969
127968
127970
- const assert = __nccwpck_require__(9491)
127971
- const { kHeadersList } = __nccwpck_require__(2785)
127972
-
127969
+ /**
127970
+ * @param {string} value
127971
+ * @returns {boolean}
127972
+ */
127973
127973
function isCTLExcludingHtab (value) {
127974
127974
if (value.length === 0) {
127975
127975
return false
@@ -128230,31 +128230,13 @@ function stringify (cookie) {
128230
128230
return out.join('; ')
128231
128231
}
128232
128232
128233
- let kHeadersListNode
128234
-
128235
- function getHeadersList (headers) {
128236
- if (headers[kHeadersList]) {
128237
- return headers[kHeadersList]
128238
- }
128239
-
128240
- if (!kHeadersListNode) {
128241
- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
128242
- (symbol) => symbol.description === 'headers list'
128243
- )
128244
-
128245
- assert(kHeadersListNode, 'Headers cannot be parsed')
128246
- }
128247
-
128248
- const headersList = headers[kHeadersListNode]
128249
- assert(headersList)
128250
-
128251
- return headersList
128252
- }
128253
-
128254
128233
module.exports = {
128255
128234
isCTLExcludingHtab,
128256
- stringify,
128257
- getHeadersList
128235
+ validateCookieName,
128236
+ validateCookiePath,
128237
+ validateCookieValue,
128238
+ toIMFDate,
128239
+ stringify
128258
128240
}
128259
128241
128260
128242
@@ -132258,6 +132240,7 @@ const {
132258
132240
isValidHeaderName,
132259
132241
isValidHeaderValue
132260
132242
} = __nccwpck_require__(2538)
132243
+ const util = __nccwpck_require__(3837)
132261
132244
const { webidl } = __nccwpck_require__(1744)
132262
132245
const assert = __nccwpck_require__(9491)
132263
132246
@@ -132811,6 +132794,9 @@ Object.defineProperties(Headers.prototype, {
132811
132794
[Symbol.toStringTag]: {
132812
132795
value: 'Headers',
132813
132796
configurable: true
132797
+ },
132798
+ [util.inspect.custom]: {
132799
+ enumerable: false
132814
132800
}
132815
132801
})
132816
132802
@@ -141987,6 +141973,20 @@ class Pool extends PoolBase {
141987
141973
? { ...options.interceptors }
141988
141974
: undefined
141989
141975
this[kFactory] = factory
141976
+
141977
+ this.on('connectionError', (origin, targets, error) => {
141978
+ // If a connection error occurs, we remove the client from the pool,
141979
+ // and emit a connectionError event. They will not be re-used.
141980
+ // Fixes https://github.com/nodejs/undici/issues/3895
141981
+ for (const target of targets) {
141982
+ // Do not use kRemoveClient here, as it will close the client,
141983
+ // but the client cannot be closed in this state.
141984
+ const idx = this[kClients].indexOf(target)
141985
+ if (idx !== -1) {
141986
+ this[kClients].splice(idx, 1)
141987
+ }
141988
+ }
141989
+ })
141990
141990
}
141991
141991
141992
141992
[kGetDispatcher] () {
0 commit comments