Skip to content

fix(server-core): normalize encoded render route paths - #9036

Merged
GiveMe-A-Name merged 1 commit into
web-infra-dev:mainfrom
SoonIter:fix-encoded-render-route-paths
Oct 22, 2026
Merged

GiveMe-A-Name merged 1 commit into
web-infra-dev:mainfrom
SoonIter:fix-encoded-render-route-paths

Conversation

@SoonIter

Copy link
Copy Markdown
Member

Summary

Requests such as /page%5Ename.html reach Hono's render middleware but return 404 because the inner render router matches the raw encoded pathname. Reuse Hono's getPath() for the render lookup so both routers use the same pathname normalization, while preserving encoded separators and explicit matchPathname rewrites.

Add regression coverage for SSR/CSR, encoded characters and subpaths, malformed escapes, percent encoding, dynamic parameters, and direct rendering. Includes a patch changeset.

Automatically generated from Rstack Eco-CI triage.

Related Links

Fixes #9034.

Failing Rslib Eco-CI job

Local validation
  • Before the fix: the caret route and encoded-path regression cases reproduce the failure (7 failed, 18 passed).
  • pnpm prepare-build: passed.
  • pnpm test:ut: 127 files passed, 766 tests passed, 3 skipped.
  • pnpm --filter @modern-js/server-core test: 116 tests passed on both Node 24.20.0 and Node 22.16.0.
  • Server-core build including declaration generation: passed.
  • pnpm check for changed files and changeset status --since=origin/main: passed.

Checklist

  • I have added changeset via pnpm run change.
  • I have updated the documentation.
  • I have added tests to cover my changes.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 09:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-21T09:47:56.583828Z 1c05655 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for modernjs-byted ready!

Name Link
🔨 Latest commit 1c05655
🔍 Latest deploy log https://app.netlify.com/projects/modernjs-byted/deploys/6ad888fae8e689a4418b3751
😎 Deploy Preview https://deploy-preview-9036--modernjs-byted.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95 (🔴 down 4 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 91 (no change from production)
PWA: -
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@GiveMe-A-Name
GiveMe-A-Name merged commit 52b4a4e into web-infra-dev:main Oct 22, 2026
10 checks passed
@GiveMe-A-Name GiveMe-A-Name mentioned this pull request Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Encoded caret paths return 404 in server-core (Eco-CI)

3 participants