@@ -13454,7 +13454,7 @@ module.exports = {
1345413454
1345513455
1345613456const { parseSetCookie } = __nccwpck_require__(8915)
13457- const { stringify, getHeadersList } = __nccwpck_require__(3834)
13457+ const { stringify } = __nccwpck_require__(3834)
1345813458const { webidl } = __nccwpck_require__(4222)
1345913459const { Headers } = __nccwpck_require__(6349)
1346013460
@@ -13530,14 +13530,13 @@ function getSetCookies (headers) {
1353013530
1353113531 webidl.brandCheck(headers, Headers, { strict: false })
1353213532
13533- const cookies = getHeadersList( headers).cookies
13533+ const cookies = headers.getSetCookie()
1353413534
1353513535 if (!cookies) {
1353613536 return []
1353713537 }
1353813538
13539- // In older versions of undici, cookies is a list of name:value.
13540- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
13539+ return cookies.map((pair) => parseSetCookie(pair))
1354113540}
1354213541
1354313542/**
@@ -13965,14 +13964,15 @@ module.exports = {
1396513964/***/ }),
1396613965
1396713966/***/ 3834:
13968- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
13967+ /***/ ((module) => {
1396913968
1397013969"use strict";
1397113970
1397213971
13973- const assert = __nccwpck_require__(2613)
13974- const { kHeadersList } = __nccwpck_require__(6443)
13975-
13972+ /**
13973+ * @param {string} value
13974+ * @returns {boolean}
13975+ */
1397613976function isCTLExcludingHtab (value) {
1397713977 if (value.length === 0) {
1397813978 return false
@@ -14233,31 +14233,13 @@ function stringify (cookie) {
1423314233 return out.join('; ')
1423414234}
1423514235
14236- let kHeadersListNode
14237-
14238- function getHeadersList (headers) {
14239- if (headers[kHeadersList]) {
14240- return headers[kHeadersList]
14241- }
14242-
14243- if (!kHeadersListNode) {
14244- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
14245- (symbol) => symbol.description === 'headers list'
14246- )
14247-
14248- assert(kHeadersListNode, 'Headers cannot be parsed')
14249- }
14250-
14251- const headersList = headers[kHeadersListNode]
14252- assert(headersList)
14253-
14254- return headersList
14255- }
14256-
1425714236module.exports = {
1425814237 isCTLExcludingHtab,
14259- stringify,
14260- getHeadersList
14238+ validateCookieName,
14239+ validateCookiePath,
14240+ validateCookieValue,
14241+ toIMFDate,
14242+ stringify
1426114243}
1426214244
1426314245
@@ -18261,6 +18243,7 @@ const {
1826118243 isValidHeaderName,
1826218244 isValidHeaderValue
1826318245} = __nccwpck_require__(5523)
18246+ const util = __nccwpck_require__(9023)
1826418247const { webidl } = __nccwpck_require__(4222)
1826518248const assert = __nccwpck_require__(2613)
1826618249
@@ -18814,6 +18797,9 @@ Object.defineProperties(Headers.prototype, {
1881418797 [Symbol.toStringTag]: {
1881518798 value: 'Headers',
1881618799 configurable: true
18800+ },
18801+ [util.inspect.custom]: {
18802+ enumerable: false
1881718803 }
1881818804})
1881918805
@@ -27990,6 +27976,20 @@ class Pool extends PoolBase {
2799027976 ? { ...options.interceptors }
2799127977 : undefined
2799227978 this[kFactory] = factory
27979+
27980+ this.on('connectionError', (origin, targets, error) => {
27981+ // If a connection error occurs, we remove the client from the pool,
27982+ // and emit a connectionError event. They will not be re-used.
27983+ // Fixes https://github.com/nodejs/undici/issues/3895
27984+ for (const target of targets) {
27985+ // Do not use kRemoveClient here, as it will close the client,
27986+ // but the client cannot be closed in this state.
27987+ const idx = this[kClients].indexOf(target)
27988+ if (idx !== -1) {
27989+ this[kClients].splice(idx, 1)
27990+ }
27991+ }
27992+ })
2799327993 }
2799427994
2799527995 [kGetDispatcher] () {
0 commit comments