@@ -92160,7 +92160,7 @@ module.exports = {
9216092160
9216192161
9216292162const { parseSetCookie } = __nccwpck_require__(8915)
92163- const { stringify, getHeadersList } = __nccwpck_require__(3834)
92163+ const { stringify } = __nccwpck_require__(3834)
9216492164const { webidl } = __nccwpck_require__(74222)
9216592165const { Headers } = __nccwpck_require__(26349)
9216692166
@@ -92236,14 +92236,13 @@ function getSetCookies (headers) {
9223692236
9223792237 webidl.brandCheck(headers, Headers, { strict: false })
9223892238
92239- const cookies = getHeadersList( headers).cookies
92239+ const cookies = headers.getSetCookie()
9224092240
9224192241 if (!cookies) {
9224292242 return []
9224392243 }
9224492244
92245- // In older versions of undici, cookies is a list of name:value.
92246- return cookies.map((pair) => parseSetCookie(Array.isArray(pair) ? pair[1] : pair))
92245+ return cookies.map((pair) => parseSetCookie(pair))
9224792246}
9224892247
9224992248/**
@@ -92671,14 +92670,15 @@ module.exports = {
9267192670/***/ }),
9267292671
9267392672/***/ 3834:
92674- /***/ ((module, __unused_webpack_exports, __nccwpck_require__ ) => {
92673+ /***/ ((module) => {
9267592674
9267692675"use strict";
9267792676
9267892677
92679- const assert = __nccwpck_require__(42613)
92680- const { kHeadersList } = __nccwpck_require__(36443)
92681-
92678+ /**
92679+ * @param {string} value
92680+ * @returns {boolean}
92681+ */
9268292682function isCTLExcludingHtab (value) {
9268392683 if (value.length === 0) {
9268492684 return false
@@ -92939,31 +92939,13 @@ function stringify (cookie) {
9293992939 return out.join('; ')
9294092940}
9294192941
92942- let kHeadersListNode
92943-
92944- function getHeadersList (headers) {
92945- if (headers[kHeadersList]) {
92946- return headers[kHeadersList]
92947- }
92948-
92949- if (!kHeadersListNode) {
92950- kHeadersListNode = Object.getOwnPropertySymbols(headers).find(
92951- (symbol) => symbol.description === 'headers list'
92952- )
92953-
92954- assert(kHeadersListNode, 'Headers cannot be parsed')
92955- }
92956-
92957- const headersList = headers[kHeadersListNode]
92958- assert(headersList)
92959-
92960- return headersList
92961- }
92962-
9296392942module.exports = {
9296492943 isCTLExcludingHtab,
92965- stringify,
92966- getHeadersList
92944+ validateCookieName,
92945+ validateCookiePath,
92946+ validateCookieValue,
92947+ toIMFDate,
92948+ stringify
9296792949}
9296892950
9296992951
@@ -96967,6 +96949,7 @@ const {
9696796949 isValidHeaderName,
9696896950 isValidHeaderValue
9696996951} = __nccwpck_require__(15523)
96952+ const util = __nccwpck_require__(39023)
9697096953const { webidl } = __nccwpck_require__(74222)
9697196954const assert = __nccwpck_require__(42613)
9697296955
@@ -97520,6 +97503,9 @@ Object.defineProperties(Headers.prototype, {
9752097503 [Symbol.toStringTag]: {
9752197504 value: 'Headers',
9752297505 configurable: true
97506+ },
97507+ [util.inspect.custom]: {
97508+ enumerable: false
9752397509 }
9752497510})
9752597511
@@ -106696,6 +106682,20 @@ class Pool extends PoolBase {
106696106682 ? { ...options.interceptors }
106697106683 : undefined
106698106684 this[kFactory] = factory
106685+
106686+ this.on('connectionError', (origin, targets, error) => {
106687+ // If a connection error occurs, we remove the client from the pool,
106688+ // and emit a connectionError event. They will not be re-used.
106689+ // Fixes https://github.com/nodejs/undici/issues/3895
106690+ for (const target of targets) {
106691+ // Do not use kRemoveClient here, as it will close the client,
106692+ // but the client cannot be closed in this state.
106693+ const idx = this[kClients].indexOf(target)
106694+ if (idx !== -1) {
106695+ this[kClients].splice(idx, 1)
106696+ }
106697+ }
106698+ })
106699106699 }
106700106700
106701106701 [kGetDispatcher] () {
0 commit comments