Skip to content

fix: raw and url query param normalization#22089

Open
bwyard wants to merge 1 commit intovitejs:mainfrom
bwyard:fix/raw-url-query-normalization
Open

fix: raw and url query param normalization#22089
bwyard wants to merge 1 commit intovitejs:mainfrom
bwyard:fix/raw-url-query-normalization

Conversation

@bwyard
Copy link
Copy Markdown

@bwyard bwyard commented Mar 31, 2026

Summary

  • rawRE and urlRE in packages/vite/src/node/utils.ts failed to match when URLSearchParams normalized valueless query params (e.g. ?raw?raw=)
  • Added =? to both regexes so they match both ?raw and ?raw= forms
  • Added regression tests covering normalized and non-normalized param forms for both regexes

Fixes #22060

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.

?raw and ?url query params fail when URL-normalized to ?raw= / ?url=

1 participant