@@ -53,7 +53,7 @@ const core = __importStar(__nccwpck_require__(7484));
53
53
const exec = __importStar(__nccwpck_require__(5236));
54
54
const fs = __importStar(__nccwpck_require__(9896));
55
55
const path = __importStar(__nccwpck_require__(6928));
56
- const VERSION = '5.4.7 ';
56
+ const VERSION = '5.4.8 ';
57
57
function run() {
58
58
return __awaiter(this, void 0, void 0, function* () {
59
59
try {
@@ -8995,7 +8995,7 @@ module.exports = {
8995
8995
8996
8996
8997
8997
const { parseSetCookie } = __nccwpck_require__(8915)
8998
- const { stringify, getHeadersList } = __nccwpck_require__(3834)
8998
+ const { stringify } = __nccwpck_require__(3834)
8999
8999
const { webidl } = __nccwpck_require__(4222)
9000
9000
const { Headers } = __nccwpck_require__(6349)
9001
9001
@@ -9071,14 +9071,13 @@ function getSetCookies (headers) {
9071
9071
9072
9072
webidl.brandCheck(headers, Headers, { strict: false })
9073
9073
9074
- const cookies = getHeadersList( headers).cookies
9074
+ const cookies = headers.getSetCookie()
9075
9075
9076
9076
if (!cookies) {
9077
9077
return []
9078
9078
}
9079
9079
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))
9082
9081
}
9083
9082
9084
9083
/**
@@ -9506,14 +9505,15 @@ module.exports = {
9506
9505
/***/ }),
9507
9506
9508
9507
/***/ 3834:
9509
- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
9508
+ /***/ ((module) => {
9510
9509
9511
9510
"use strict";
9512
9511
9513
9512
9514
- const assert = __nccwpck_require__(2613)
9515
- const { kHeadersList } = __nccwpck_require__(6443)
9516
-
9513
+ /**
9514
+ * @param {string} value
9515
+ * @returns {boolean}
9516
+ */
9517
9517
function isCTLExcludingHtab (value) {
9518
9518
if (value.length === 0) {
9519
9519
return false
@@ -9774,31 +9774,13 @@ function stringify (cookie) {
9774
9774
return out.join('; ')
9775
9775
}
9776
9776
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
-
9798
9777
module.exports = {
9799
9778
isCTLExcludingHtab,
9800
- stringify,
9801
- getHeadersList
9779
+ validateCookieName,
9780
+ validateCookiePath,
9781
+ validateCookieValue,
9782
+ toIMFDate,
9783
+ stringify
9802
9784
}
9803
9785
9804
9786
@@ -13802,6 +13784,7 @@ const {
13802
13784
isValidHeaderName,
13803
13785
isValidHeaderValue
13804
13786
} = __nccwpck_require__(5523)
13787
+ const util = __nccwpck_require__(9023)
13805
13788
const { webidl } = __nccwpck_require__(4222)
13806
13789
const assert = __nccwpck_require__(2613)
13807
13790
@@ -14355,6 +14338,9 @@ Object.defineProperties(Headers.prototype, {
14355
14338
[Symbol.toStringTag]: {
14356
14339
value: 'Headers',
14357
14340
configurable: true
14341
+ },
14342
+ [util.inspect.custom]: {
14343
+ enumerable: false
14358
14344
}
14359
14345
})
14360
14346
@@ -23531,6 +23517,20 @@ class Pool extends PoolBase {
23531
23517
? { ...options.interceptors }
23532
23518
: undefined
23533
23519
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
+ })
23534
23534
}
23535
23535
23536
23536
[kGetDispatcher] () {
0 commit comments