Repository: unjs/h3
Pull request #780 (2024-06-19 00:03:54)

chore(deps): update devdependency undici to v6
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [undici](https://undici.nodejs.org) ([source](https://togithub.com/nodejs/undici)) | [`^5.28.4` -> `^6.19.2`](https://renovatebot.com/diffs/npm/undici/5.28.4/6.19.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/undici/6.19.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/undici/6.19.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/undici/5.28.4/6.19.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/undici/5.28.4/6.19.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>nodejs/undici (undici)</summary>

### [`v6.19.2`](https://togithub.com/nodejs/undici/releases/tag/v6.19.2)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.19.1...v6.19.2)

#### What's Changed

-   fix [#&#8203;3337](https://togithub.com/nodejs/undici/issues/3337) by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3338](https://togithub.com/nodejs/undici/pull/3338)
-   build: use `husky` as `husky install` is deprecated by [@&#8203;jazelly](https://togithub.com/jazelly) in [https://github.com/nodejs/undici/pull/3340](https://togithub.com/nodejs/undici/pull/3340)
-   fix: interceptors.d.ts has no default export by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3332](https://togithub.com/nodejs/undici/pull/3332)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.19.1...v6.19.2

### [`v6.19.1`](https://togithub.com/nodejs/undici/compare/v6.19.0...f6b9b442b02d8ab81b06ea0473e1c22bc8ddc254)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.19.0...v6.19.1)

### [`v6.19.0`](https://togithub.com/nodejs/undici/releases/tag/v6.19.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.18.2...v6.19.0)

#### What's Changed

-   build(deps): bump ossf/scorecard-action from 2.3.1 to 2.3.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3305](https://togithub.com/nodejs/undici/pull/3305)
-   build(deps): bump codecov/codecov-action from 4.3.1 to 4.4.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3303](https://togithub.com/nodejs/undici/pull/3303)
-   build(deps): bump step-security/harden-runner from 2.7.1 to 2.8.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3304](https://togithub.com/nodejs/undici/pull/3304)
-   build(deps): bump github/codeql-action from 3.25.3 to 3.25.7 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3306](https://togithub.com/nodejs/undici/pull/3306)
-   build(deps): bump node from `9e8f45f` to `dd7e693` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3309](https://togithub.com/nodejs/undici/pull/3309)
-   build(deps): bump node from `dd7e693` to `e6d4495` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3313](https://togithub.com/nodejs/undici/pull/3313)
-   remove websocket experimental warning by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3311](https://togithub.com/nodejs/undici/pull/3311)
-   perf: optimization of request instantiation by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3107](https://togithub.com/nodejs/undici/pull/3107)
-   perf: convert object to params by [@&#8203;DarkGL](https://togithub.com/DarkGL) in [https://github.com/nodejs/undici/pull/3302](https://togithub.com/nodejs/undici/pull/3302)
-   build(deps-dev): bump borp from 0.14.0 to 0.15.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3320](https://togithub.com/nodejs/undici/pull/3320)
-   build(deps-dev): bump c8 from 9.1.0 to 10.0.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3321](https://togithub.com/nodejs/undici/pull/3321)
-   fix: add missing error classes to types by [@&#8203;maxbeatty](https://togithub.com/maxbeatty) in [https://github.com/nodejs/undici/pull/3316](https://togithub.com/nodejs/undici/pull/3316)
-   export interceptor to type def file by [@&#8203;jakecastelli](https://togithub.com/jakecastelli) in [https://github.com/nodejs/undici/pull/3318](https://togithub.com/nodejs/undici/pull/3318)
-   build(deps): bump node from `e6d4495` to `075a5cc` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3326](https://togithub.com/nodejs/undici/pull/3326)
-   doc: clearify the behaviour of `bodyTimeout` in the request by [@&#8203;jakecastelli](https://togithub.com/jakecastelli) in [https://github.com/nodejs/undici/pull/3324](https://togithub.com/nodejs/undici/pull/3324)
-   feature: support pre-shared sessions by [@&#8203;tastypackets](https://togithub.com/tastypackets) in [https://github.com/nodejs/undici/pull/3325](https://togithub.com/nodejs/undici/pull/3325)

#### New Contributors

-   [@&#8203;maxbeatty](https://togithub.com/maxbeatty) made their first contribution in [https://github.com/nodejs/undici/pull/3316](https://togithub.com/nodejs/undici/pull/3316)
-   [@&#8203;jakecastelli](https://togithub.com/jakecastelli) made their first contribution in [https://github.com/nodejs/undici/pull/3318](https://togithub.com/nodejs/undici/pull/3318)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.18.2...v6.19.0

### [`v6.18.2`](https://togithub.com/nodejs/undici/compare/v6.18.1...665f24738041757789fab95cce40cb0345cf2c0f)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.18.1...v6.18.2)

### [`v6.18.1`](https://togithub.com/nodejs/undici/releases/tag/v6.18.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.18.0...v6.18.1)

#### What's Changed

-   docs: Update references to dispatcher in docs by [@&#8203;haikyuu](https://togithub.com/haikyuu) in [https://github.com/nodejs/undici/pull/3281](https://togithub.com/nodejs/undici/pull/3281)
-   fix: compatibility for global headers by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3286](https://togithub.com/nodejs/undici/pull/3286)
-   websocket: pre-calculated length by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3284](https://togithub.com/nodejs/undici/pull/3284)
-   ci: fix autobahn workflow by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3291](https://togithub.com/nodejs/undici/pull/3291)
-   revert: "websocket: pre-calculated length" by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3290](https://togithub.com/nodejs/undici/pull/3290)
-   websocket: use FixedQueue instead of Set by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3283](https://togithub.com/nodejs/undici/pull/3283)

#### New Contributors

-   [@&#8203;haikyuu](https://togithub.com/haikyuu) made their first contribution in [https://github.com/nodejs/undici/pull/3281](https://togithub.com/nodejs/undici/pull/3281)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.18.0...v6.18.1

### [`v6.18.0`](https://togithub.com/nodejs/undici/releases/tag/v6.18.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.17.0...v6.18.0)

#### What's Changed

-   permessage-deflate decompression support in websocket by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3263](https://togithub.com/nodejs/undici/pull/3263)
-   fix: Fix server closing in tests. by [@&#8203;ShogunPanda](https://togithub.com/ShogunPanda) in [https://github.com/nodejs/undici/pull/3279](https://togithub.com/nodejs/undici/pull/3279)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.17.0...v6.18.0

### [`v6.17.0`](https://togithub.com/nodejs/undici/releases/tag/v6.17.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.16.1...v6.17.0)

#### What's Changed

-   fetch: fix captureStackTrace by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3227](https://togithub.com/nodejs/undici/pull/3227)
-   fetch: fix wpt test request-upload.any.js by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3234](https://togithub.com/nodejs/undici/pull/3234)
-   websocket: don't clone buffer by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3240](https://togithub.com/nodejs/undici/pull/3240)
-   Remove unecessary async from writeBuffer by [@&#8203;DarkGL](https://togithub.com/DarkGL) in [https://github.com/nodejs/undici/pull/3245](https://togithub.com/nodejs/undici/pull/3245)
-   refactor websocket control frame handling by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3241](https://togithub.com/nodejs/undici/pull/3241)
-   fix parsing continuation frames in websocket by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3247](https://togithub.com/nodejs/undici/pull/3247)
-   ci: node nightly test should use node 23 by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3248](https://togithub.com/nodejs/undici/pull/3248)
-   Add test to verify if the connection is correctly aborted on cancel by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3219](https://togithub.com/nodejs/undici/pull/3219)
-   Autobahn suite by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3251](https://togithub.com/nodejs/undici/pull/3251)
-   websocket: fix 6 autobahn tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3254](https://togithub.com/nodejs/undici/pull/3254)
-   websocket: checkout correct commit in autobahn workflow by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3258](https://togithub.com/nodejs/undici/pull/3258)
-   Cleanup websocket by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3257](https://togithub.com/nodejs/undici/pull/3257)
-   websocket: autobahn workflow should fail on error by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3259](https://togithub.com/nodejs/undici/pull/3259)
-   add bodymixin bytes by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3262](https://togithub.com/nodejs/undici/pull/3262)
-   perf: avoid buffer cloning by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3264](https://togithub.com/nodejs/undici/pull/3264)
-   feat: dump interceptor by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3118](https://togithub.com/nodejs/undici/pull/3118)
-   use private properties in Headers by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3269](https://togithub.com/nodejs/undici/pull/3269)
-   Revert "websocket: autobahn workflow should fail on error" by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3270](https://togithub.com/nodejs/undici/pull/3270)
-   build(deps): bump node from `487dc5d` to `9e8f45f` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3271](https://togithub.com/nodejs/undici/pull/3271)

#### New Contributors

-   [@&#8203;DarkGL](https://togithub.com/DarkGL) made their first contribution in [https://github.com/nodejs/undici/pull/3245](https://togithub.com/nodejs/undici/pull/3245)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.16.1...v6.17.0

### [`v6.16.1`](https://togithub.com/nodejs/undici/releases/tag/v6.16.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.16.0...v6.16.1)

#### What's Changed

-   fix some typos by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3217](https://togithub.com/nodejs/undici/pull/3217)
-   websocket: move codeblock in parseCloseBody by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3215](https://togithub.com/nodejs/undici/pull/3215)
-   fetch: enable wpt test request-referrer.any.js by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3223](https://togithub.com/nodejs/undici/pull/3223)
-   fetch: wpt add /fetch/api/resources/cache.py to server.mjs by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3225](https://togithub.com/nodejs/undici/pull/3225)
-   add pipe support for wpt server by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3228](https://togithub.com/nodejs/undici/pull/3228)
-   test: reduce the number of requests in `fire-and-forget.js` by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3229](https://togithub.com/nodejs/undici/pull/3229)
-   ci: add node 22 in ci test matrix, use 22 for coverage by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3226](https://togithub.com/nodejs/undici/pull/3226)
-   fetch: don't set an invalid origin header by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3235](https://togithub.com/nodejs/undici/pull/3235)
-   fail wpt runner if expected failures does not match actual by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3236](https://togithub.com/nodejs/undici/pull/3236)
-   fix: ignore content-length when dumping HEAD by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3222](https://togithub.com/nodejs/undici/pull/3222)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.16.0...v6.16.1

### [`v6.16.0`](https://togithub.com/nodejs/undici/releases/tag/v6.16.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.15.0...v6.16.0)

#### What's Changed

-   add index to sequence converter errors by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3178](https://togithub.com/nodejs/undici/pull/3178)
-   build(deps-dev): bump borp from 0.12.0 to 0.13.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3179](https://togithub.com/nodejs/undici/pull/3179)
-   build(deps): bump node from 21-alpine3.19 to 22-alpine3.19 in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3180](https://togithub.com/nodejs/undici/pull/3180)
-   build(deps): bump superagent from 8.1.2 to 9.0.2 in /benchmarks by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3181](https://togithub.com/nodejs/undici/pull/3181)
-   fix: keep raw header name by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3183](https://togithub.com/nodejs/undici/pull/3183)
-   fix(fetch): improve Headers and Request type-compatibility by [@&#8203;kettanaito](https://togithub.com/kettanaito) in [https://github.com/nodejs/undici/pull/1964](https://togithub.com/nodejs/undici/pull/1964)
-   fix 3 mimesniff tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3185](https://togithub.com/nodejs/undici/pull/3185)
-   build(deps): bump hendrikmuhs/ccache-action from 1.2.12 to 1.2.13 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3187](https://togithub.com/nodejs/undici/pull/3187)
-   build(deps): bump codecov/codecov-action from 4.1.1 to 4.3.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3191](https://togithub.com/nodejs/undici/pull/3191)
-   build(deps): bump github/codeql-action from 3.24.9 to 3.25.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3192](https://togithub.com/nodejs/undici/pull/3192)
-   build(deps): bump actions/dependency-review-action from 4.2.5 to 4.3.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3189](https://togithub.com/nodejs/undici/pull/3189)
-   build(deps): bump step-security/harden-runner from 2.7.0 to 2.7.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3188](https://togithub.com/nodejs/undici/pull/3188)
-   build(deps): bump actions/upload-artifact from 4.3.1 to 4.3.3 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3190](https://togithub.com/nodejs/undici/pull/3190)
-   build(deps): bump node from `9459e24` to `487dc5d` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3195](https://togithub.com/nodejs/undici/pull/3195)
-   perf: avoid spread in makeRequest() by [@&#8203;gunjam](https://togithub.com/gunjam) in [https://github.com/nodejs/undici/pull/3193](https://togithub.com/nodejs/undici/pull/3193)
-   refactor: code cleanup by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3194](https://togithub.com/nodejs/undici/pull/3194)
-   fix parsing when receiving empty body websocket by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3205](https://togithub.com/nodejs/undici/pull/3205)
-   fix: MockResponseCallbackOptions type by [@&#8203;merojosa](https://togithub.com/merojosa) in [https://github.com/nodejs/undici/pull/2951](https://togithub.com/nodejs/undici/pull/2951)
-   docs(proxy): fix typo by [@&#8203;kanadgupta](https://togithub.com/kanadgupta) in [https://github.com/nodejs/undici/pull/3207](https://togithub.com/nodejs/undici/pull/3207)
-   fix websocket receiving an invalid utf-8 in close frame by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3206](https://togithub.com/nodejs/undici/pull/3206)
-   perf: avoid setImmediate if body is reading by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3210](https://togithub.com/nodejs/undici/pull/3210)
-   fix: request abort signal by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3209](https://togithub.com/nodejs/undici/pull/3209)
-   fix: remove abort handler on close by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3211](https://togithub.com/nodejs/undici/pull/3211)
-   fix: pass abort function by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3212](https://togithub.com/nodejs/undici/pull/3212)
-   websocket: 200x faster generate mask by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3204](https://togithub.com/nodejs/undici/pull/3204)
-   use FinalizationRegistry to cancel the body if response is collected by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3199](https://togithub.com/nodejs/undici/pull/3199)
-   websocket: don't clone buffer if it's not needed. by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3214](https://togithub.com/nodejs/undici/pull/3214)
-   websocket: use FastBuffer by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3213](https://togithub.com/nodejs/undici/pull/3213)

#### New Contributors

-   [@&#8203;kettanaito](https://togithub.com/kettanaito) made their first contribution in [https://github.com/nodejs/undici/pull/1964](https://togithub.com/nodejs/undici/pull/1964)
-   [@&#8203;gunjam](https://togithub.com/gunjam) made their first contribution in [https://github.com/nodejs/undici/pull/3193](https://togithub.com/nodejs/undici/pull/3193)
-   [@&#8203;merojosa](https://togithub.com/merojosa) made their first contribution in [https://github.com/nodejs/undici/pull/2951](https://togithub.com/nodejs/undici/pull/2951)
-   [@&#8203;kanadgupta](https://togithub.com/kanadgupta) made their first contribution in [https://github.com/nodejs/undici/pull/3207](https://togithub.com/nodejs/undici/pull/3207)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.15.0...v6.16.0

### [`v6.15.0`](https://togithub.com/nodejs/undici/releases/tag/v6.15.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.14.1...v6.15.0)

#### What's Changed

-   Expose EnvHttpProxyAgent to Node.js core bundle, so it can be turned … by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3148](https://togithub.com/nodejs/undici/pull/3148)
-   test: add headerslist copy check by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3156](https://togithub.com/nodejs/undici/pull/3156)
-   chore: ensure automated v6 release compared to v6 by [@&#8203;mweberxyz](https://togithub.com/mweberxyz) in [https://github.com/nodejs/undici/pull/3149](https://togithub.com/nodejs/undici/pull/3149)
-   fetch: do not leak signal listeners by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3158](https://togithub.com/nodejs/undici/pull/3158)
-   fix: request cache mode is not the same as request mode by [@&#8203;tsibley](https://togithub.com/tsibley) in [https://github.com/nodejs/undici/pull/3151](https://togithub.com/nodejs/undici/pull/3151)
-   fetch: don't re-lowercase HeadersList by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3159](https://togithub.com/nodejs/undici/pull/3159)
-   fix casing issue when cloning Headers object by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3160](https://togithub.com/nodejs/undici/pull/3160)
-   build(deps): bump node from `6d0f18a` to `db8772d` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3163](https://togithub.com/nodejs/undici/pull/3163)
-   fix header cloning bug by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3162](https://togithub.com/nodejs/undici/pull/3162)
-   chore: change bench naming for h2 by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3165](https://togithub.com/nodejs/undici/pull/3165)
-   expose WebSocket related events in node bundle by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3167](https://togithub.com/nodejs/undici/pull/3167)
-   feat: add support for if-match on retry handler by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3144](https://togithub.com/nodejs/undici/pull/3144)
-   fix: correct firing order of abort events by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3169](https://togithub.com/nodejs/undici/pull/3169)
-   create fast MessageEvent by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3170](https://togithub.com/nodejs/undici/pull/3170)
-   chore: add explicitly [@&#8203;fastify/busboy](https://togithub.com/fastify/busboy) by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3172](https://togithub.com/nodejs/undici/pull/3172)
-   chore: remove sinon as dev dependency by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3171](https://togithub.com/nodejs/undici/pull/3171)
-   webidl changes by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3175](https://togithub.com/nodejs/undici/pull/3175)
-   preserve dictionary key name in webidl errors by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3176](https://togithub.com/nodejs/undici/pull/3176)

#### New Contributors

-   [@&#8203;tsibley](https://togithub.com/tsibley) made their first contribution in [https://github.com/nodejs/undici/pull/3151](https://togithub.com/nodejs/undici/pull/3151)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.14.1...v6.15.0

### [`v6.14.1`](https://togithub.com/nodejs/undici/releases/tag/v6.14.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.14.0...v6.14.1)

#### What's Changed

-   fix: tweak keep-alive timeout implementation by [@&#8203;mweberxyz](https://togithub.com/mweberxyz) in [https://github.com/nodejs/undici/pull/3145](https://togithub.com/nodejs/undici/pull/3145)
-   build(deps-dev): bump borp from 0.11.0 to 0.12.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3153](https://togithub.com/nodejs/undici/pull/3153)
-   build(deps): bump node from `ad255c6` to `6d0f18a` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3154](https://togithub.com/nodejs/undici/pull/3154)
-   fix(EnvHttpProxyAgent): prefer lowercase env vars by [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) in [https://github.com/nodejs/undici/pull/3152](https://togithub.com/nodejs/undici/pull/3152)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.14.0...v6.14.1

### [`v6.14.0`](https://togithub.com/nodejs/undici/releases/tag/v6.14.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.13.0...v6.14.0)

#### What's Changed

-   bench: enable benchmarks for h2 by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3100](https://togithub.com/nodejs/undici/pull/3100)
-   perf: improve performance of isomorphicEncode by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3101](https://togithub.com/nodejs/undici/pull/3101)
-   util: remove isReadableAborted by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3104](https://togithub.com/nodejs/undici/pull/3104)
-   fix(types): The second parameter of EventSource is optional by [@&#8203;zbinlin](https://togithub.com/zbinlin) in [https://github.com/nodejs/undici/pull/3106](https://togithub.com/nodejs/undici/pull/3106)
-   fix: onConnect types by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3116](https://togithub.com/nodejs/undici/pull/3116)
-   add dispatcher option to EventSource by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3119](https://togithub.com/nodejs/undici/pull/3119)
-   core: improve parseURL by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3102](https://togithub.com/nodejs/undici/pull/3102)
-   test: increase coverage by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3121](https://togithub.com/nodejs/undici/pull/3121)
-   docs: add directions to run docs and benchmarks by [@&#8203;FatumaA](https://togithub.com/FatumaA) in [https://github.com/nodejs/undici/pull/3092](https://togithub.com/nodejs/undici/pull/3092)
-   perf: avoid unnecessary clone by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3117](https://togithub.com/nodejs/undici/pull/3117)
-   build(deps-dev): bump borp from 0.10.0 to 0.11.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3126](https://togithub.com/nodejs/undici/pull/3126)
-   drop node support for < v18.17.0 by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3125](https://togithub.com/nodejs/undici/pull/3125)
-   test: improve test and ci performance by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3135](https://togithub.com/nodejs/undici/pull/3135)
-   Added EnvHttpProxyAgent to support HTTP_PROXY by [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) in [https://github.com/nodejs/undici/pull/2994](https://togithub.com/nodejs/undici/pull/2994)
-   fetch: Change wording of "Body is unusable" error by [@&#8203;nzakas](https://togithub.com/nzakas) in [https://github.com/nodejs/undici/pull/3105](https://togithub.com/nodejs/undici/pull/3105)
-   perf: use class instead of object literals with getters by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3138](https://togithub.com/nodejs/undici/pull/3138)
-   fix: unhandled exception or failing error body by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3137](https://togithub.com/nodejs/undici/pull/3137)
-   reuse realm for Request/Response by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3142](https://togithub.com/nodejs/undici/pull/3142)
-   fix([H2-#&#8203;3140](https://togithub.com/H2-/undici/issues/3140)): abort requets upon GOAWAY by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3143](https://togithub.com/nodejs/undici/pull/3143)
-   don't store realm on Request/Response by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3146](https://togithub.com/nodejs/undici/pull/3146)
-   improve: wasm build by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3074](https://togithub.com/nodejs/undici/pull/3074)

#### New Contributors

-   [@&#8203;10xLaCroixDrinker](https://togithub.com/10xLaCroixDrinker) made their first contribution in [https://github.com/nodejs/undici/pull/2994](https://togithub.com/nodejs/undici/pull/2994)
-   [@&#8203;nzakas](https://togithub.com/nzakas) made their first contribution in [https://github.com/nodejs/undici/pull/3105](https://togithub.com/nodejs/undici/pull/3105)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.13.0...v6.14.0

### [`v6.13.0`](https://togithub.com/nodejs/undici/releases/tag/v6.13.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.12.0...v6.13.0)

#### What's Changed

-   build(deps): bump node from `9696b26` to `ad255c6` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3073](https://togithub.com/nodejs/undici/pull/3073)
-   test: remove only by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3077](https://togithub.com/nodejs/undici/pull/3077)
-   fix: defer errors with setImmediate by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3081](https://togithub.com/nodejs/undici/pull/3081)
-   improve DecoratorHandler by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3079](https://togithub.com/nodejs/undici/pull/3079)
-   chore: removed unused escapeFormDataName by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3084](https://togithub.com/nodejs/undici/pull/3084)
-   Mention option to pass streams into FormData by [@&#8203;JaoodxD](https://togithub.com/JaoodxD) in [https://github.com/nodejs/undici/pull/3086](https://togithub.com/nodejs/undici/pull/3086)
-   fetch: improve performance of isValidEncodedURL by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3090](https://togithub.com/nodejs/undici/pull/3090)
-   optimize utf8Decode by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3085](https://togithub.com/nodejs/undici/pull/3085)
-   refactor: h2 refactoring by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3082](https://togithub.com/nodejs/undici/pull/3082)
-   Skip the creation of a transform stream in fetch by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3093](https://togithub.com/nodejs/undici/pull/3093)
-   fetch: improve performance of urlHasHttpsScheme by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3094](https://togithub.com/nodejs/undici/pull/3094)
-   fetch: avoid creation of an intermediary ReadableStream by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3095](https://togithub.com/nodejs/undici/pull/3095)
-   test: duplicate jest unspecific tests to native runner by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3075](https://togithub.com/nodejs/undici/pull/3075)
-   build(deps): bump node from `ad255c6` to `6d0f18a` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3096](https://togithub.com/nodejs/undici/pull/3096)
-   fetch: improve performance of isValidHeaderValue by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3098](https://togithub.com/nodejs/undici/pull/3098)
-   chore: automate releases with pr by [@&#8203;mweberxyz](https://togithub.com/mweberxyz) in [https://github.com/nodejs/undici/pull/3089](https://togithub.com/nodejs/undici/pull/3089)

#### New Contributors

-   [@&#8203;github-actions](https://togithub.com/github-actions) made their first contribution in [https://github.com/nodejs/undici/pull/3099](https://togithub.com/nodejs/undici/pull/3099)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.12.0...v6.13.0

### [`v6.12.0`](https://togithub.com/nodejs/undici/releases/tag/v6.12.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.11.1...v6.12.0)

#### What's Changed

-   fix: broken test by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3045](https://togithub.com/nodejs/undici/pull/3045)
-   fix: http2 header parsing by [@&#8203;climba03003](https://togithub.com/climba03003) in [https://github.com/nodejs/undici/pull/3047](https://togithub.com/nodejs/undici/pull/3047)
-   types: fix Request.refererPolicy and RequestInit.refererPolicy are incompatible by [@&#8203;zbinlin](https://togithub.com/zbinlin) in [https://github.com/nodejs/undici/pull/3039](https://togithub.com/nodejs/undici/pull/3039)
-   fix(types): onHeaders always takes headers as an array of buffer by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3050](https://togithub.com/nodejs/undici/pull/3050)
-   fix: ProxyAgent causes request.headers.host to be forcibly reset by [@&#8203;1zilc](https://togithub.com/1zilc) in [https://github.com/nodejs/undici/pull/3026](https://togithub.com/nodejs/undici/pull/3026)
-   fallback to Buffer.isUtf8 on platforms without icu by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3006](https://togithub.com/nodejs/undici/pull/3006)
-   build(deps): bump github/codeql-action from 3.24.6 to 3.24.9 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3037](https://togithub.com/nodejs/undici/pull/3037)
-   build(deps): bump actions/dependency-review-action from 4.1.3 to 4.2.5 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3035](https://togithub.com/nodejs/undici/pull/3035)
-   build(deps): bump node from `577f8eb` to `87524df` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3055](https://togithub.com/nodejs/undici/pull/3055)
-   build(deps): bump node from `87524df` to `9696b26` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3058](https://togithub.com/nodejs/undici/pull/3058)
-   fetch: Block ports 4190 & 6679 by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/3059](https://togithub.com/nodejs/undici/pull/3059)
-   test: activate testing for interceptors and cache by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3061](https://togithub.com/nodejs/undici/pull/3061)
-   cache: improve test coverage by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3063](https://togithub.com/nodejs/undici/pull/3063)
-   feat: modernize fuzzing by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3060](https://togithub.com/nodejs/undici/pull/3060)
-   fix: request abort by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3056](https://togithub.com/nodejs/undici/pull/3056)
-   fix: signal handling by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3053](https://togithub.com/nodejs/undici/pull/3053)
-   fix(H2): handle goaway properly by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3057](https://togithub.com/nodejs/undici/pull/3057)
-   test: client, set body to null if bigger than CHUNK_LIMIT by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3064](https://togithub.com/nodejs/undici/pull/3064)
-   mock: improve mock interceptor by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3062](https://togithub.com/nodejs/undici/pull/3062)
-   fix: bad client destroy on servername change by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3066](https://togithub.com/nodejs/undici/pull/3066)
-   perf: improve isBlobLike by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3070](https://togithub.com/nodejs/undici/pull/3070)
-   test: add sanity check for llhttp wasm files by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/3068](https://togithub.com/nodejs/undici/pull/3068)

#### New Contributors

-   [@&#8203;zbinlin](https://togithub.com/zbinlin) made their first contribution in [https://github.com/nodejs/undici/pull/3039](https://togithub.com/nodejs/undici/pull/3039)
-   [@&#8203;1zilc](https://togithub.com/1zilc) made their first contribution in [https://github.com/nodejs/undici/pull/3026](https://togithub.com/nodejs/undici/pull/3026)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.11.1...v6.12.0

### [`v6.11.1`](https://togithub.com/nodejs/undici/releases/tag/v6.11.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.11.0...v6.11.1)

### :warning: Security Release ⚠️

#### What's Changed

-   Fixes https://github.com/nodejs/undici/security/advisories/GHSA-m4v8-wqvr-p9f7 CVE-2024-30260
-   Fixes https://github.com/nodejs/undici/security/advisories/GHSA-9qxr-qj54-h672 CVE-2024-30261
-   Revert "fix: don't leak internal class ([#&#8203;3024](https://togithub.com/nodejs/undici/issues/3024))" by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/3044](https://togithub.com/nodejs/undici/pull/3044)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.11.0...v6.11.1

### [`v6.11.0`](https://togithub.com/nodejs/undici/releases/tag/v6.11.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.10.2...v6.11.0)

#### What's Changed

-   refactor([#&#8203;3023](https://togithub.com/nodejs/undici/issues/3023)): Pass headers as array instead by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3025](https://togithub.com/nodejs/undici/pull/3025)
-   fix: don't leak internal class by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3024](https://togithub.com/nodejs/undici/pull/3024)
-   build(deps): bump codecov/codecov-action from 4.1.0 to 4.1.1 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3034](https://togithub.com/nodejs/undici/pull/3034)
-   build(deps-dev): bump tsd from 0.30.7 to 0.31.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3038](https://togithub.com/nodejs/undici/pull/3038)
-   build(deps-dev): bump borp from 0.9.1 to 0.10.0 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/2947](https://togithub.com/nodejs/undici/pull/2947)
-   missing commits by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/3040](https://togithub.com/nodejs/undici/pull/3040)
-   build(deps): bump actions/checkout from 4.1.1 to 4.1.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/3036](https://togithub.com/nodejs/undici/pull/3036)
-   fix: regexp pattern by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/3041](https://togithub.com/nodejs/undici/pull/3041)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.10.2...v6.11.0

### [`v6.10.2`](https://togithub.com/nodejs/undici/releases/tag/v6.10.2)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.10.1...v6.10.2)

##### What's Changed

-   Do not fail test if streams support typed arrays by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/2978](https://togithub.com/nodejs/undici/pull/2978)
-   fix(fetch): properly redirect non-ascii location header url by [@&#8203;Xvezda](https://togithub.com/Xvezda) in [https://github.com/nodejs/undici/pull/2971](https://togithub.com/nodejs/undici/pull/2971)
-   perf: Remove double-stringify in setCookie by [@&#8203;peterver](https://togithub.com/peterver) in [https://github.com/nodejs/undici/pull/2980](https://togithub.com/nodejs/undici/pull/2980)
-   \[fix [#&#8203;2982](https://togithub.com/nodejs/undici/issues/2982)] use DispatcherInterceptor type for Dispatcher#Compose by [@&#8203;clovis-guillemot](https://togithub.com/clovis-guillemot) in [https://github.com/nodejs/undici/pull/2983](https://togithub.com/nodejs/undici/pull/2983)
-   fix: make EventSource properties enumerable by [@&#8203;MattBidewell](https://togithub.com/MattBidewell) in [https://github.com/nodejs/undici/pull/2987](https://togithub.com/nodejs/undici/pull/2987)
-   docs: ✏️ fixed benchmark links by [@&#8203;benhalverson](https://togithub.com/benhalverson) in [https://github.com/nodejs/undici/pull/2991](https://togithub.com/nodejs/undici/pull/2991)
-   fix([#&#8203;2986](https://togithub.com/nodejs/undici/issues/2986)): bad start check by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/2992](https://togithub.com/nodejs/undici/pull/2992)
-   fix(H2 Client): bind stream 'data' listener only after received 'response' event by [@&#8203;St3ffGv4](https://togithub.com/St3ffGv4) in [https://github.com/nodejs/undici/pull/2985](https://togithub.com/nodejs/undici/pull/2985)
-   feat:  added search input by [@&#8203;benhalverson](https://togithub.com/benhalverson) in [https://github.com/nodejs/undici/pull/2993](https://togithub.com/nodejs/undici/pull/2993)
-   chore: validate responses can be consumed without a Content-Length or… by [@&#8203;jacob-ebey](https://togithub.com/jacob-ebey) in [https://github.com/nodejs/undici/pull/2995](https://togithub.com/nodejs/undici/pull/2995)
-   fix error message by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/2998](https://togithub.com/nodejs/undici/pull/2998)
-   Revert "perf: reuse TextDecoder instance ([#&#8203;2863](https://togithub.com/nodejs/undici/issues/2863))" by [@&#8203;panva](https://togithub.com/panva) in [https://github.com/nodejs/undici/pull/2999](https://togithub.com/nodejs/undici/pull/2999)
-   test: remove only by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/3001](https://togithub.com/nodejs/undici/pull/3001)

##### New Contributors

-   [@&#8203;Xvezda](https://togithub.com/Xvezda) made their first contribution in [https://github.com/nodejs/undici/pull/2971](https://togithub.com/nodejs/undici/pull/2971)
-   [@&#8203;peterver](https://togithub.com/peterver) made their first contribution in [https://github.com/nodejs/undici/pull/2980](https://togithub.com/nodejs/undici/pull/2980)
-   [@&#8203;clovis-guillemot](https://togithub.com/clovis-guillemot) made their first contribution in [https://github.com/nodejs/undici/pull/2983](https://togithub.com/nodejs/undici/pull/2983)
-   [@&#8203;MattBidewell](https://togithub.com/MattBidewell) made their first contribution in [https://github.com/nodejs/undici/pull/2987](https://togithub.com/nodejs/undici/pull/2987)
-   [@&#8203;benhalverson](https://togithub.com/benhalverson) made their first contribution in [https://github.com/nodejs/undici/pull/2991](https://togithub.com/nodejs/undici/pull/2991)
-   [@&#8203;St3ffGv4](https://togithub.com/St3ffGv4) made their first contribution in [https://github.com/nodejs/undici/pull/2985](https://togithub.com/nodejs/undici/pull/2985)
-   [@&#8203;jacob-ebey](https://togithub.com/jacob-ebey) made their first contribution in [https://github.com/nodejs/undici/pull/2995](https://togithub.com/nodejs/undici/pull/2995)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.10.0...v6.10.2

### [`v6.10.1`](https://togithub.com/nodejs/undici/compare/v6.10.0...dd3918fee4f90e02fb93ff1bc04e707144041938)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.10.0...v6.10.1)

### [`v6.10.0`](https://togithub.com/nodejs/undici/releases/tag/v6.10.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.9.0...v6.10.0)

#### What's Changed

-   test: fix flakyness of issue-803 test by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2960](https://togithub.com/nodejs/undici/pull/2960)
-   Cleanup format by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/2959](https://togithub.com/nodejs/undici/pull/2959)
-   Chore: run tests daily against node nightly by [@&#8203;mweberxyz](https://togithub.com/mweberxyz) in [https://github.com/nodejs/undici/pull/2969](https://togithub.com/nodejs/undici/pull/2969)
-   fix: fix retry handler option by [@&#8203;acommodari](https://togithub.com/acommodari) in [https://github.com/nodejs/undici/pull/2962](https://togithub.com/nodejs/undici/pull/2962)
-   build(deps): bump node from `4999fa1` to `577f8eb` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/2974](https://togithub.com/nodejs/undici/pull/2974)
-   feat(TS): add types for composed dispatchers by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/2967](https://togithub.com/nodejs/undici/pull/2967)
-   fix: count for error response and network errors by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/2966](https://togithub.com/nodejs/undici/pull/2966)

#### New Contributors

-   [@&#8203;mweberxyz](https://togithub.com/mweberxyz) made their first contribution in [https://github.com/nodejs/undici/pull/2969](https://togithub.com/nodejs/undici/pull/2969)
-   [@&#8203;acommodari](https://togithub.com/acommodari) made their first contribution in [https://github.com/nodejs/undici/pull/2962](https://togithub.com/nodejs/undici/pull/2962)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.9.0...v6.10.0

### [`v6.9.0`](https://togithub.com/nodejs/undici/releases/tag/v6.9.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.8.0...v6.9.0)

#### What's Changed

-   feat: add new dispatch compose by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/2826](https://togithub.com/nodejs/undici/pull/2826)
-   ci: add macos-latest to test-matrix by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2952](https://togithub.com/nodejs/undici/pull/2952)
-   types: align RequestInit.body type with lib.dom.ts by [@&#8203;jdufresne](https://togithub.com/jdufresne) in [https://github.com/nodejs/undici/pull/2956](https://togithub.com/nodejs/undici/pull/2956)
-   ci: pin versions of github actions by [@&#8203;UlisesGascon](https://togithub.com/UlisesGascon) in [https://github.com/nodejs/undici/pull/2957](https://togithub.com/nodejs/undici/pull/2957)
-   fetch: improve output for FormData, Response, Request by [@&#8203;mertcanaltin](https://togithub.com/mertcanaltin) in [https://github.com/nodejs/undici/pull/2955](https://togithub.com/nodejs/undici/pull/2955)
-   perf: optimize collectASequenceOfBytes by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/2958](https://togithub.com/nodejs/undici/pull/2958)

#### New Contributors

-   [@&#8203;jdufresne](https://togithub.com/jdufresne) made their first contribution in [https://github.com/nodejs/undici/pull/2956](https://togithub.com/nodejs/undici/pull/2956)
-   [@&#8203;UlisesGascon](https://togithub.com/UlisesGascon) made their first contribution in [https://github.com/nodejs/undici/pull/2957](https://togithub.com/nodejs/undici/pull/2957)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.8.0...v6.9.0

### [`v6.8.0`](https://togithub.com/nodejs/undici/releases/tag/v6.8.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.7.1...v6.8.0)

#### What's Changed

-   fix: send correct SNI for proxy connections by [@&#8203;chrros95](https://togithub.com/chrros95) in [https://github.com/nodejs/undici/pull/2939](https://togithub.com/nodejs/undici/pull/2939)
-   build(deps): bump node from `8bf9240` to `7bfef1d` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/2937](https://togithub.com/nodejs/undici/pull/2937)
-   fetch: improve util.inspect output for web specifications by [@&#8203;mertcanaltin](https://togithub.com/mertcanaltin) in [https://github.com/nodejs/undici/pull/2938](https://togithub.com/nodejs/undici/pull/2938)
-   ci: fix broken ci on windows and node v21 because of libuv bug by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2941](https://togithub.com/nodejs/undici/pull/2941)
-   perf: improve getResolveErrorBodyCallback by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2940](https://togithub.com/nodejs/undici/pull/2940)
-   fix: don't assign kAgent twice by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/2942](https://togithub.com/nodejs/undici/pull/2942)
-   perf: dump immediatly if known size exceeds limit by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/2882](https://togithub.com/nodejs/undici/pull/2882)
-   build(deps): bump node from `7bfef1d` to `4999fa1` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/2946](https://togithub.com/nodejs/undici/pull/2946)
-   try to fix windows failure by [@&#8203;ronag](https://togithub.com/ronag) in [https://github.com/nodejs/undici/pull/2950](https://togithub.com/nodejs/undici/pull/2950)
-   perf: improve parsing form-data by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/2944](https://togithub.com/nodejs/undici/pull/2944)

#### New Contributors

-   [@&#8203;chrros95](https://togithub.com/chrros95) made their first contribution in [https://github.com/nodejs/undici/pull/2939](https://togithub.com/nodejs/undici/pull/2939)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.7.1...v6.8.0

### [`v6.7.1`](https://togithub.com/nodejs/undici/releases/tag/v6.7.1)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.7.0...v6.7.1)

#### What's Changed

-   fetch: use EOL of os-module by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2915](https://togithub.com/nodejs/undici/pull/2915)
-   ci: only send codecov from ubuntu and node by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2914](https://togithub.com/nodejs/undici/pull/2914)
-   tests: improve skip for unix.js tests, remove skipped tests by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2916](https://togithub.com/nodejs/undici/pull/2916)
-   chore: fix typo in isHistoryNavigation comments by [@&#8203;kachick](https://togithub.com/kachick) in [https://github.com/nodejs/undici/pull/2920](https://togithub.com/nodejs/undici/pull/2920)
-   fix(benchmark): set body correctly by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/2918](https://togithub.com/nodejs/undici/pull/2918)
-   chore: increase test coverage to 100% for /lib/api/api-request.js by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2912](https://togithub.com/nodejs/undici/pull/2912)
-   fix: chunksDecode cuts off 3 characters at the end if having BOM by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2922](https://togithub.com/nodejs/undici/pull/2922)
-   docs: clarify URI parsing behavior of ProxyAgent constructor by [@&#8203;rossilor95](https://togithub.com/rossilor95) in [https://github.com/nodejs/undici/pull/2893](https://togithub.com/nodejs/undici/pull/2893)
-   implement sync formdata parser by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/2911](https://togithub.com/nodejs/undici/pull/2911)
-   Fix docs links and add examples to sidebar by [@&#8203;tastypackets](https://togithub.com/tastypackets) in [https://github.com/nodejs/undici/pull/2895](https://togithub.com/nodejs/undici/pull/2895)
-   doc: update diagnostics channel request headers type change by [@&#8203;jessezhang91](https://togithub.com/jessezhang91) in [https://github.com/nodejs/undici/pull/2925](https://togithub.com/nodejs/undici/pull/2925)
-   perf: optimize getResolveErrorBodyCallback by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/2921](https://togithub.com/nodejs/undici/pull/2921)
-   override request dispatcher from init by [@&#8203;matthieusieben](https://togithub.com/matthieusieben) in [https://github.com/nodejs/undici/pull/2928](https://togithub.com/nodejs/undici/pull/2928)
-   add busboy tests by [@&#8203;KhafraDev](https://togithub.com/KhafraDev) in [https://github.com/nodejs/undici/pull/2924](https://togithub.com/nodejs/undici/pull/2924)
-   fix(benchmark): make it fair by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/2929](https://togithub.com/nodejs/undici/pull/2929)
-   Revert "chore: remove no-simd wasm" by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2935](https://togithub.com/nodejs/undici/pull/2935)
-   build(deps): bump node from `d3271e4` to `8bf9240` in /build by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/nodejs/undici/pull/2936](https://togithub.com/nodejs/undici/pull/2936)
-   Flip link between docs and README by [@&#8203;mcollina](https://togithub.com/mcollina) in [https://github.com/nodejs/undici/pull/2933](https://togithub.com/nodejs/undici/pull/2933)

#### New Contributors

-   [@&#8203;kachick](https://togithub.com/kachick) made their first contribution in [https://github.com/nodejs/undici/pull/2920](https://togithub.com/nodejs/undici/pull/2920)
-   [@&#8203;tastypackets](https://togithub.com/tastypackets) made their first contribution in [https://github.com/nodejs/undici/pull/2895](https://togithub.com/nodejs/undici/pull/2895)
-   [@&#8203;jessezhang91](https://togithub.com/jessezhang91) made their first contribution in [https://github.com/nodejs/undici/pull/2925](https://togithub.com/nodejs/undici/pull/2925)
-   [@&#8203;matthieusieben](https://togithub.com/matthieusieben) made their first contribution in [https://github.com/nodejs/undici/pull/2928](https://togithub.com/nodejs/undici/pull/2928)

**Full Changelog**: https://github.com/nodejs/undici/compare/v6.7.0...v6.7.1

### [`v6.7.0`](https://togithub.com/nodejs/undici/releases/tag/v6.7.0)

[Compare Source](https://togithub.com/nodejs/undici/compare/v6.6.2...v6.7.0)

#### What's Changed

-   test: remove t.diagnostics() calls in push-dont-push.js test by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2715](https://togithub.com/nodejs/undici/pull/2715)
-   fix: fix flaky debug test by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2714](https://togithub.com/nodejs/undici/pull/2714)
-   fix: HTTP2 tweaks by [@&#8203;metcoder95](https://togithub.com/metcoder95) in [https://github.com/nodejs/undici/pull/2711](https://togithub.com/nodejs/undici/pull/2711)
-   test: improve cookie tests by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2693](https://togithub.com/nodejs/undici/pull/2693)
-   test: response.url after redirect is set to target url by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2716](https://togithub.com/nodejs/undici/pull/2716)
-   chore: remove mocha and chai by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2696](https://togithub.com/nodejs/undici/pull/2696)
-   test: replace t.pass with t.ok by [@&#8203;Uzlopak](https://togithub.com/Uzlopak) in [https://github.com/nodejs/undici/pull/2721](https://togithub.com/nodejs/undici/pull/2721)
-   perf: remove redundant operation in FormData by [@&#8203;tsctx](https://togithub.com/tsctx) in [https://github.com/nodejs/undici/pull/2726](https://togithub.com/nodejs/undici/pull/2726)
-   Add support for passing iterable objects as headers by [@&#8203;JaoodxD](https://togithub.com/JaoodxD) in [https://github.com/nodejs/undici/pull/2708](https://togithub.com/nodejs/undici/pull/2708)
-   chore: refine esbuild & node detecti

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/unjs/h3).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40MTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjQxMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->


cloudflare-pages[bot]: ## Deploying unjs-h3 with &nbsp;<a href="https://pages.dev"><img alt="Cloudflare Pages" src="https://user-images.githubusercontent.com/23264/106598434-9e719e00-654f-11eb-9e59-6167043cfa01.png" width="16"></a> &nbsp;Cloudflare Pages

<table><tr><td><strong>Latest commit:</strong> </td><td>
<code>5bfff18</code>
</td></tr>
<tr><td><strong>Status:</strong></td><td>&nbsp;✅&nbsp; Deploy successful!</td></tr>
<tr><td><strong>Preview URL:</strong></td><td>
<a href='https://db6a2d97.unjs-h3.pages.dev'>https://db6a2d97.unjs-h3.pages.dev</a>
</td></tr>
<tr><td><strong>Branch Preview URL:</strong></td><td>
<a href='https://renovate-undici-6-x.unjs-h3.pages.dev'>https://renovate-undici-6-x.unjs-h3.pages.dev</a>
</td></tr>
</table>

[View logs](https://dash.cloudflare.com/?to=/:account/pages/view/unjs-h3/db6a2d97-4a34-4b49-972e-8bf28b814726)


Patch:
diff --git a/package.json b/package.json
index 54dd243..6ccb9c5 100644
--- a/package.json
+++ b/package.json
@@ -65,7 +65,7 @@
     "supertest": "^7.0.0",
     "typescript": "^5.4.5",
     "unbuild": "^2.0.0",
-    "undici": "^5.28.4",
+    "undici": "^6.19.2",
     "vitest": "^1.5.2",
     "zod": "^3.23.4"
   },
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b3f6455..7d55a34 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,8 +106,8 @@ importers:
         specifier: ^2.0.0
         version: 2.0.0(typescript@5.4.5)
       undici:
-        specifier: ^5.28.4
-        version: 5.28.4
+        specifier: ^6.19.2
+        version: 6.19.2
       vitest:
         specifier: ^1.5.2
         version: 1.6.0(@types/node@20.14.2)
@@ -692,10 +692,6 @@ packages:
     resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==}
     engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
 
-  '@fastify/busboy@2.1.1':
-    resolution: {integrity: sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA==}
-    engines: {node: '>=14'}
-
   '@humanwhocodes/module-importer@1.0.1':
     resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==}
     engines: {node: '>=12.22'}
@@ -3771,9 +3767,9 @@ packages:
   undici-types@5.26.5:
     resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==}
 
-  undici@5.28.4:
-    resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==}
-    engines: {node: '>=14.0'}
+  undici@6.19.2:
+    resolution: {integrity: sha512-JfjKqIauur3Q6biAtHJ564e3bWa8VvT+7cSiOJHFbX4Erv6CLGDpg8z+Fmg/1OI/47RA+GI2QZaF48SSaLvyBA==}
+    engines: {node: '>=18.17'}
 
   unenv@1.9.0:
     resolution: {integrity: sha512-QKnFNznRxmbOF1hDgzpqrlIf6NC5sbZ2OJ+5Wl3OX8uM+LUJXbj4TXvLJCtwbPTmbMHCLIz6JLKNinNsMShK9g==}
@@ -4387,8 +4383,6 @@ snapshots:
 
   '@eslint/object-schema@2.1.4': {}
 
-  '@fastify/busboy@2.1.1': {}
-
   '@humanwhocodes/module-importer@1.0.1': {}
 
   '@humanwhocodes/retry@0.3.0': {}
@@ -7885,9 +7879,7 @@ snapshots:
 
   undici-types@5.26.5: {}
 
-  undici@5.28.4:
-    dependencies:
-      '@fastify/busboy': 2.1.1
+  undici@6.19.2: {}
 
   unenv@1.9.0:
     dependencies:
diff --git a/src/adapters/node.ts b/src/adapters/node.ts
index 62680e4..1d91d73 100644
--- a/src/adapters/node.ts
+++ b/src/adapters/node.ts
@@ -6,6 +6,7 @@ import { App } from "../app";
 import { createError, isError, sendError } from "../error";
 import { createEvent, eventHandler, isEventHandler } from "../event";
 import { EventHandler, EventHandlerResponse } from "../types";
+import { setResponseStatus } from "../utils";
 
 // Node.js
 export type {
@@ -62,6 +63,9 @@ export function toNodeListener(app: App): NodeListener {
         error.unhandled = true;
       }
 
+      // #754 Make sure hooks see correct status code and message
+      setResponseStatus(event, error.statusCode, error.statusMessage);
+
       if (app.options.onError) {
         await app.options.onError(error, event);
       }
@@ -71,7 +75,14 @@ export function toNodeListener(app: App): NodeListener {
       if (error.unhandled || error.fatal) {
         console.error("[h3]", error.fatal ? "[fatal]" : "[unhandled]", error);
       }
+
+      if (app.options.onBeforeResponse && !event._onBeforeResponseCalled) {
+        await app.options.onBeforeResponse(event, { body: error });
+      }
       await sendError(event, error, !!app.options.debug);
+      if (app.options.onAfterResponse && !event._onAfterResponseCalled) {
+        await app.options.onAfterResponse(event, { body: error });
+      }
     }
   };
   return toNodeHandle;
diff --git a/src/app.ts b/src/app.ts
index 2a8d6fe..1ea5774 100644
--- a/src/app.ts
+++ b/src/app.ts
@@ -179,10 +179,12 @@ export function createAppEventHandler(stack: Stack, options: AppOptions) {
       if (_body !== undefined) {
         const _response = { body: _body };
         if (options.onBeforeResponse) {
+          event._onBeforeResponseCalled = true;
           await options.onBeforeResponse(event, _response);
         }
         await handleHandlerResponse(event, _response.body, spacing);
         if (options.onAfterResponse) {
+          event._onAfterResponseCalled = true;
           await options.onAfterResponse(event, _response);
         }
         return;
@@ -191,6 +193,7 @@ export function createAppEventHandler(stack: Stack, options: AppOptions) {
       // Already handled
       if (event.handled) {
         if (options.onAfterResponse) {
+          event._onAfterResponseCalled = true;
           await options.onAfterResponse(event, undefined);
         }
         return;
@@ -205,6 +208,7 @@ export function createAppEventHandler(stack: Stack, options: AppOptions) {
     }
 
     if (options.onAfterResponse) {
+      event._onAfterResponseCalled = true;
       await options.onAfterResponse(event, undefined);
     }
   });
diff --git a/src/event/event.ts b/src/event/event.ts
index c0aa5f4..1852634 100644
--- a/src/event/event.ts
+++ b/src/event/event.ts
@@ -34,6 +34,10 @@ export class H3Event<
   // Response
   _handled = false;
 
+  // Hooks
+  _onBeforeResponseCalled: boolean | undefined;
+  _onAfterResponseCalled: boolean | undefined;
+
   constructor(req: NodeIncomingMessage, res: NodeServerResponse) {
     this.node = { req, res };
   }


Test patch:
diff --git a/test/app.test.ts b/test/app.test.ts
index 67f6d37..a8d722c 100644
--- a/test/app.test.ts
+++ b/test/app.test.ts
@@ -395,10 +395,82 @@ describe("app", () => {
     expect(onRequest).toHaveBeenCalledTimes(1);
     expect(onRequest.mock.calls[0][0].path).toBe("/foo");
 
+    expect(onError).toHaveBeenCalledTimes(0);
+
     expect(onBeforeResponse).toHaveBeenCalledTimes(1);
     expect(onBeforeResponse.mock.calls[0][1].body).toBe("Hello World!");
 
     expect(onAfterResponse).toHaveBeenCalledTimes(1);
     expect(onAfterResponse.mock.calls[0][1].body).toBe("Hello World!");
   });
+
+  it("сalls onRequest and onResponse when an exception is thrown", async () => {
+    app.use(
+      eventHandler(() => {
+        throw createError({
+          statusCode: 503,
+        });
+      }),
+    );
+    await request.get("/foo");
+
+    expect(onRequest).toHaveBeenCalledTimes(1);
+    expect(onRequest.mock.calls[0][0].path).toBe("/foo");
+
+    expect(onError).toHaveBeenCalledTimes(1);
+    expect(onError.mock.calls[0][0].statusCode).toBe(503);
+    expect(onError.mock.calls[0][1].path).toBe("/foo");
+
+    expect(onBeforeResponse).toHaveBeenCalledTimes(1);
+    expect(onBeforeResponse.mock.calls[0][0].node.res.statusCode).toBe(503);
+
+    expect(onAfterResponse).toHaveBeenCalledTimes(1);
+    expect(onAfterResponse.mock.calls[0][0].node.res.statusCode).toBe(503);
+  });
+
+  it("calls onRequest and onResponse when an error is returned", async () => {
+    app.use(
+      eventHandler(() => {
+        return createError({
+          statusCode: 404,
+        });
+      }),
+    );
+    await request.get("/foo");
+
+    expect(onRequest).toHaveBeenCalledTimes(1);
+    expect(onRequest.mock.calls[0][0].path).toBe("/foo");
+
+    expect(onError).toHaveBeenCalledTimes(1);
+
+    expect(onBeforeResponse).toHaveBeenCalledTimes(1);
+    expect(onBeforeResponse.mock.calls[0][0].node.res.statusCode).toBe(404);
+
+    expect(onAfterResponse).toHaveBeenCalledTimes(1);
+    expect(onAfterResponse.mock.calls[0][0].node.res.statusCode).toBe(404);
+  });
+
+  it("calls onRequest and onResponse when an unhandled error occurs", async () => {
+    app.use(
+      eventHandler((event) => {
+        // @ts-expect-error
+        return event.unknown.property;
+      }),
+    );
+    await request.get("/foo");
+
+    expect(onRequest).toHaveBeenCalledTimes(1);
+    expect(onRequest.mock.calls[0][0].path).toBe("/foo");
+
+    expect(onError).toHaveBeenCalledTimes(1);
+    expect(onError.mock.calls[0][0].statusCode).toBe(500);
+    expect(onError.mock.calls[0][0].cause).toBeInstanceOf(TypeError);
+    expect(onError.mock.calls[0][1].path).toBe("/foo");
+
+    expect(onBeforeResponse).toHaveBeenCalledTimes(1);
+    expect(onBeforeResponse.mock.calls[0][0].node.res.statusCode).toBe(500);
+
+    expect(onAfterResponse).toHaveBeenCalledTimes(1);
+    expect(onAfterResponse.mock.calls[0][0].node.res.statusCode).toBe(500);
+  });
 });