@@ -46919,7 +46919,7 @@ module.exports = {
4691946919
4692046920
4692146921const { parseSetCookie } = __nccwpck_require__(4408)
46922- const { stringify, getHeadersList } = __nccwpck_require__(3121)
46922+ const { stringify } = __nccwpck_require__(3121)
4692346923const { webidl } = __nccwpck_require__(1744)
4692446924const { Headers } = __nccwpck_require__(554)
4692546925
@@ -46995,14 +46995,13 @@ function getSetCookies (headers) {
4699546995
4699646996 webidl.brandCheck(headers, Headers, { strict: false })
4699746997
46998- const cookies = getHeadersList( headers).cookies
46998+ const cookies = headers.getSetCookie()
4699946999
4700047000 if (!cookies) {
4700147001 return []
4700247002 }
4700347003
47004- // In older versions of undici, cookies is a list of name:value.
47005- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
47004+ return cookies.map((pair) => parseSetCookie(pair))
4700647005}
4700747006
4700847007/**
@@ -47430,14 +47429,15 @@ module.exports = {
4743047429/***/ }),
4743147430
4743247431/***/ 3121:
47433- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
47432+ /***/ ((module) => {
4743447433
4743547434"use strict";
4743647435
4743747436
47438- const assert = __nccwpck_require__(9491)
47439- const { kHeadersList } = __nccwpck_require__(2785)
47440-
47437+ /**
47438+ * @param {string} value
47439+ * @returns {boolean}
47440+ */
4744147441function isCTLExcludingHtab (value) {
4744247442 if (value.length === 0) {
4744347443 return false
@@ -47698,31 +47698,13 @@ function stringify (cookie) {
4769847698 return out.join('; ')
4769947699}
4770047700
47701- let kHeadersListNode
47702-
47703- function getHeadersList (headers) {
47704- if (headers[kHeadersList]) {
47705- return headers[kHeadersList]
47706- }
47707-
47708- if (!kHeadersListNode) {
47709- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
47710- (symbol) => symbol.description === 'headers list'
47711- )
47712-
47713- assert(kHeadersListNode, 'Headers cannot be parsed')
47714- }
47715-
47716- const headersList = headers[kHeadersListNode]
47717- assert(headersList)
47718-
47719- return headersList
47720- }
47721-
4772247701module.exports = {
4772347702 isCTLExcludingHtab,
47724- stringify,
47725- getHeadersList
47703+ validateCookieName,
47704+ validateCookiePath,
47705+ validateCookieValue,
47706+ toIMFDate,
47707+ stringify
4772647708}
4772747709
4772847710
@@ -51726,6 +51708,7 @@ const {
5172651708 isValidHeaderName,
5172751709 isValidHeaderValue
5172851710} = __nccwpck_require__(2538)
51711+ const util = __nccwpck_require__(3837)
5172951712const { webidl } = __nccwpck_require__(1744)
5173051713const assert = __nccwpck_require__(9491)
5173151714
@@ -52279,6 +52262,9 @@ Object.defineProperties(Headers.prototype, {
5227952262 [Symbol.toStringTag]: {
5228052263 value: 'Headers',
5228152264 configurable: true
52265+ },
52266+ [util.inspect.custom]: {
52267+ enumerable: false
5228252268 }
5228352269})
5228452270
@@ -61455,6 +61441,20 @@ class Pool extends PoolBase {
6145561441 ? { ...options.interceptors }
6145661442 : undefined
6145761443 this[kFactory] = factory
61444+
61445+ this.on('connectionError', (origin, targets, error) => {
61446+ // If a connection error occurs, we remove the client from the pool,
61447+ // and emit a connectionError event. They will not be re-used.
61448+ // Fixes https://github.com/nodejs/undici/issues/3895
61449+ for (const target of targets) {
61450+ // Do not use kRemoveClient here, as it will close the client,
61451+ // but the client cannot be closed in this state.
61452+ const idx = this[kClients].indexOf(target)
61453+ if (idx !== -1) {
61454+ this[kClients].splice(idx, 1)
61455+ }
61456+ }
61457+ })
6145861458 }
6145961459
6146061460 [kGetDispatcher] () {
0 commit comments