Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Normalize domain-based i18n request paths consistently#17399

Merged
matthewp merged 3 commits into
mainwithastro/astro:mainfrom
i18n-canonical-pathnamewithastro/astro:i18n-canonical-pathnameCopy head branch name to clipboard
Jul 16, 2026
Merged

Normalize domain-based i18n request paths consistently#17399
matthewp merged 3 commits into
mainwithastro/astro:mainfrom
i18n-canonical-pathnamewithastro/astro:i18n-canonical-pathnameCopy head branch name to clipboard

Conversation

@matthewp

@matthewp matthewp commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Normalizes the public request pathname once before deriving base-stripped and domain-prefixed routing paths, keeping middleware and routing canonicalization aligned.
  • Reuses that normalized pathname for domain-based i18n instead of decoding the derived pathname separately.

Testing

  • Adds domain-i18n coverage for multi-encoded Unicode path parameters and the public Astro.url pathname.
  • Adds a regression assertion that over-encoded paths on mapped domains return 400.

Docs

  • No docs update needed because this fixes internal routing consistency without changing the public API.

@changeset-bot

changeset-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 49e661e

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the pkg: astro Related to the core `astro` package (scope) label Jul 16, 2026
@matthewp matthewp changed the title Fix domain i18n pathname normalization Normalize domain-based i18n request paths consistently Jul 16, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 16, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 21 untouched benchmarks


Comparing i18n-canonical-pathname (49e661e) with main (d9f99e1)1

Open in CodSpeed

Footnotes

  1. No successful run was found on main (fdd673c) during the generation of this report, so d9f99e1 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@matthewp
matthewp marked this pull request as ready for review July 16, 2026 15:01
Comment thread .changeset/tidy-pathnames-agree.md Outdated
'astro': patch
---

Uses the normalized request pathname when deriving paths for domain-based i18n routing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You might want to reword this changeset from the user point of view. What did we fix for them?

@matthewp
matthewp merged commit 4b03702 into main Jul 16, 2026
29 checks passed
@matthewp
matthewp deleted the i18n-canonical-pathname branch July 16, 2026 16:52
@astrobot-houston astrobot-houston mentioned this pull request Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.