@@ -53,7 +53,7 @@ const core = __importStar(__nccwpck_require__(7484));
5353const exec = __importStar(__nccwpck_require__(5236));
5454const fs = __importStar(__nccwpck_require__(9896));
5555const path = __importStar(__nccwpck_require__(6928));
56- const VERSION = '5.4.7 ';
56+ const VERSION = '5.4.8 ';
5757function run() {
5858 return __awaiter(this, void 0, void 0, function* () {
5959 try {
@@ -8995,7 +8995,7 @@ module.exports = {
89958995
89968996
89978997const { parseSetCookie } = __nccwpck_require__(8915)
8998- const { stringify, getHeadersList } = __nccwpck_require__(3834)
8998+ const { stringify } = __nccwpck_require__(3834)
89998999const { webidl } = __nccwpck_require__(4222)
90009000const { Headers } = __nccwpck_require__(6349)
90019001
@@ -9071,14 +9071,13 @@ function getSetCookies (headers) {
90719071
90729072 webidl.brandCheck(headers, Headers, { strict: false })
90739073
9074- const cookies = getHeadersList( headers).cookies
9074+ const cookies = headers.getSetCookie()
90759075
90769076 if (!cookies) {
90779077 return []
90789078 }
90799079
9080- // In older versions of undici, cookies is a list of name:value.
9081- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
9080+ return cookies.map((pair) => parseSetCookie(pair))
90829081}
90839082
90849083/**
@@ -9506,14 +9505,15 @@ module.exports = {
95069505/***/ }),
95079506
95089507/***/ 3834:
9509- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
9508+ /***/ ((module) => {
95109509
95119510"use strict";
95129511
95139512
9514- const assert = __nccwpck_require__(2613)
9515- const { kHeadersList } = __nccwpck_require__(6443)
9516-
9513+ /**
9514+ * @param {string} value
9515+ * @returns {boolean}
9516+ */
95179517function isCTLExcludingHtab (value) {
95189518 if (value.length === 0) {
95199519 return false
@@ -9774,31 +9774,13 @@ function stringify (cookie) {
97749774 return out.join('; ')
97759775}
97769776
9777- let kHeadersListNode
9778-
9779- function getHeadersList (headers) {
9780- if (headers[kHeadersList]) {
9781- return headers[kHeadersList]
9782- }
9783-
9784- if (!kHeadersListNode) {
9785- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
9786- (symbol) => symbol.description === 'headers list'
9787- )
9788-
9789- assert(kHeadersListNode, 'Headers cannot be parsed')
9790- }
9791-
9792- const headersList = headers[kHeadersListNode]
9793- assert(headersList)
9794-
9795- return headersList
9796- }
9797-
97989777module.exports = {
97999778 isCTLExcludingHtab,
9800- stringify,
9801- getHeadersList
9779+ validateCookieName,
9780+ validateCookiePath,
9781+ validateCookieValue,
9782+ toIMFDate,
9783+ stringify
98029784}
98039785
98049786
@@ -13802,6 +13784,7 @@ const {
1380213784 isValidHeaderName,
1380313785 isValidHeaderValue
1380413786} = __nccwpck_require__(5523)
13787+ const util = __nccwpck_require__(9023)
1380513788const { webidl } = __nccwpck_require__(4222)
1380613789const assert = __nccwpck_require__(2613)
1380713790
@@ -14355,6 +14338,9 @@ Object.defineProperties(Headers.prototype, {
1435514338 [Symbol.toStringTag]: {
1435614339 value: 'Headers',
1435714340 configurable: true
14341+ },
14342+ [util.inspect.custom]: {
14343+ enumerable: false
1435814344 }
1435914345})
1436014346
@@ -23531,6 +23517,20 @@ class Pool extends PoolBase {
2353123517 ? { ...options.interceptors }
2353223518 : undefined
2353323519 this[kFactory] = factory
23520+
23521+ this.on('connectionError', (origin, targets, error) => {
23522+ // If a connection error occurs, we remove the client from the pool,
23523+ // and emit a connectionError event. They will not be re-used.
23524+ // Fixes https://github.com/nodejs/undici/issues/3895
23525+ for (const target of targets) {
23526+ // Do not use kRemoveClient here, as it will close the client,
23527+ // but the client cannot be closed in this state.
23528+ const idx = this[kClients].indexOf(target)
23529+ if (idx !== -1) {
23530+ this[kClients].splice(idx, 1)
23531+ }
23532+ }
23533+ })
2353423534 }
2353523535
2353623536 [kGetDispatcher] () {
0 commit comments