[PR #480] [MERGED] fix: bind iterator methods on request headers proxy #602

Closed
opened 2026-05-06 13:09:01 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/480
Author: @Divkix
Created: 3/12/2026
Status: Merged
Merged: 3/12/2026
Merged by: @james-elicx

Base: mainHead: fix/headers-iterator-binding


📝 Commits (1)

  • 9f66c8c fix: bind iterator methods on request headers proxy

📊 Changes

4 files changed (+118 additions, -6 deletions)

View changed files

📝 packages/vinext/src/shims/headers.ts (+2 -6)
tests/fixtures/app-basic/app/nextjs-compat/api/headers-iterate/route.ts (+25 -0)
📝 tests/nextjs-compat/request-apis.test.ts (+28 -0)
📝 tests/shims.test.ts (+63 -0)

📄 Description

Summary

  • bind non-mutating request header proxy members, including Symbol.iterator, to the live Headers instance
  • add shim regression coverage for iterator-based headers() access, ported from the Next.js headers adapter tests
  • add a live App Router route handler regression that exercises Array.from(headers()), entries(), keys(), values(), and Object.fromEntries()

Testing

  • pnpm test tests/shims.test.ts
  • pnpm test tests/nextjs-compat/request-apis.test.ts
  • pnpm run lint
  • pnpm run fmt -- packages/vinext/src/shims/headers.ts tests/shims.test.ts tests/nextjs-compat/request-apis.test.ts tests/fixtures/app-basic/app/nextjs-compat/api/headers-iterate/route.ts

Refs #443


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/480 **Author:** [@Divkix](https://github.com/Divkix) **Created:** 3/12/2026 **Status:** ✅ Merged **Merged:** 3/12/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `fix/headers-iterator-binding` --- ### 📝 Commits (1) - [`9f66c8c`](https://github.com/cloudflare/vinext/commit/9f66c8c01342a4bdfe2c16a278a5f98df01d16f8) fix: bind iterator methods on request headers proxy ### 📊 Changes **4 files changed** (+118 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `packages/vinext/src/shims/headers.ts` (+2 -6) ➕ `tests/fixtures/app-basic/app/nextjs-compat/api/headers-iterate/route.ts` (+25 -0) 📝 `tests/nextjs-compat/request-apis.test.ts` (+28 -0) 📝 `tests/shims.test.ts` (+63 -0) </details> ### 📄 Description ## Summary - bind non-mutating request header proxy members, including `Symbol.iterator`, to the live `Headers` instance - add shim regression coverage for iterator-based `headers()` access, ported from the Next.js headers adapter tests - add a live App Router route handler regression that exercises `Array.from(headers())`, `entries()`, `keys()`, `values()`, and `Object.fromEntries()` ## Testing - pnpm test tests/shims.test.ts - pnpm test tests/nextjs-compat/request-apis.test.ts - pnpm run lint - pnpm run fmt -- packages/vinext/src/shims/headers.ts tests/shims.test.ts tests/nextjs-compat/request-apis.test.ts tests/fixtures/app-basic/app/nextjs-compat/api/headers-iterate/route.ts Refs #443 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:09:01 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#602
No description provided.