@@ -14503,7 +14503,7 @@ module.exports = {
1450314503
1450414504
1450514505const { parseSetCookie } = __nccwpck_require__(8915)
14506- const { stringify, getHeadersList } = __nccwpck_require__(3834)
14506+ const { stringify } = __nccwpck_require__(3834)
1450714507const { webidl } = __nccwpck_require__(4222)
1450814508const { Headers } = __nccwpck_require__(6349)
1450914509
@@ -14579,14 +14579,13 @@ function getSetCookies (headers) {
1457914579
1458014580 webidl.brandCheck(headers, Headers, { strict: false })
1458114581
14582- const cookies = getHeadersList( headers).cookies
14582+ const cookies = headers.getSetCookie()
1458314583
1458414584 if (!cookies) {
1458514585 return []
1458614586 }
1458714587
14588- // In older versions of undici, cookies is a list of name:value.
14589- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
14588+ return cookies.map((pair) => parseSetCookie(pair))
1459014589}
1459114590
1459214591/**
@@ -15014,14 +15013,15 @@ module.exports = {
1501415013/***/ }),
1501515014
1501615015/***/ 3834:
15017- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
15016+ /***/ ((module) => {
1501815017
1501915018"use strict";
1502015019
1502115020
15022- const assert = __nccwpck_require__(2613)
15023- const { kHeadersList } = __nccwpck_require__(6443)
15024-
15021+ /**
15022+ * @param {string} value
15023+ * @returns {boolean}
15024+ */
1502515025function isCTLExcludingHtab (value) {
1502615026 if (value.length === 0) {
1502715027 return false
@@ -15282,31 +15282,13 @@ function stringify (cookie) {
1528215282 return out.join('; ')
1528315283}
1528415284
15285- let kHeadersListNode
15286-
15287- function getHeadersList (headers) {
15288- if (headers[kHeadersList]) {
15289- return headers[kHeadersList]
15290- }
15291-
15292- if (!kHeadersListNode) {
15293- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
15294- (symbol) => symbol.description === 'headers list'
15295- )
15296-
15297- assert(kHeadersListNode, 'Headers cannot be parsed')
15298- }
15299-
15300- const headersList = headers[kHeadersListNode]
15301- assert(headersList)
15302-
15303- return headersList
15304- }
15305-
1530615285module.exports = {
1530715286 isCTLExcludingHtab,
15308- stringify,
15309- getHeadersList
15287+ validateCookieName,
15288+ validateCookiePath,
15289+ validateCookieValue,
15290+ toIMFDate,
15291+ stringify
1531015292}
1531115293
1531215294
@@ -19310,6 +19292,7 @@ const {
1931019292 isValidHeaderName,
1931119293 isValidHeaderValue
1931219294} = __nccwpck_require__(5523)
19295+ const util = __nccwpck_require__(9023)
1931319296const { webidl } = __nccwpck_require__(4222)
1931419297const assert = __nccwpck_require__(2613)
1931519298
@@ -19863,6 +19846,9 @@ Object.defineProperties(Headers.prototype, {
1986319846 [Symbol.toStringTag]: {
1986419847 value: 'Headers',
1986519848 configurable: true
19849+ },
19850+ [util.inspect.custom]: {
19851+ enumerable: false
1986619852 }
1986719853})
1986819854
@@ -29039,6 +29025,20 @@ class Pool extends PoolBase {
2903929025 ? { ...options.interceptors }
2904029026 : undefined
2904129027 this[kFactory] = factory
29028+
29029+ this.on('connectionError', (origin, targets, error) => {
29030+ // If a connection error occurs, we remove the client from the pool,
29031+ // and emit a connectionError event. They will not be re-used.
29032+ // Fixes https://github.com/nodejs/undici/issues/3895
29033+ for (const target of targets) {
29034+ // Do not use kRemoveClient here, as it will close the client,
29035+ // but the client cannot be closed in this state.
29036+ const idx = this[kClients].indexOf(target)
29037+ if (idx !== -1) {
29038+ this[kClients].splice(idx, 1)
29039+ }
29040+ }
29041+ })
2904229042 }
2904329043
2904429044 [kGetDispatcher] () {
0 commit comments