mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #677] [MERGED] fix: percent-encode X-Vinext-Params to allow non-ASCII route params #762
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#762
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/677
Author: @southpolesteve
Created: 3/24/2026
Status: ✅ Merged
Merged: 3/24/2026
Merged by: @southpolesteve
Base:
main← Head:fix/non-ascii-params-bytestring-676📝 Commits (1)
edc637bfix: percent-encode X-Vinext-Params to allow non-ASCII route params (#676)📊 Changes
3 files changed (+26 additions, -4 deletions)
View changed files
📝
packages/vinext/src/server/app-browser-entry.ts(+2 -2)📝
packages/vinext/src/server/app-page-response.ts(+3 -1)📝
tests/app-page-response.test.ts(+21 -1)📄 Description
Summary
buildAppPageRscResponsewas callingHeaders.set("X-Vinext-Params", JSON.stringify(params))with raw Unicode characters in the valueTypeError: Cannot convert argument to a ByteStringbuildAppPageHtmlResponse) never set this headerFix
encodeURIComponentwhen settingX-Vinext-Paramsinapp-page-response.tsdecodeURIComponentin both read sites inapp-browser-entry.ts(initial hydration and client-side navigation)Test
Added a unit test to
tests/app-page-response.test.tsthat verifies:Closes #676
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.