-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite ssr - spaces in url leads to different req.pathname #9446
Comments
It's worth noting that my route handling is set up to handle a special root page:
|
Hello @mkilpatrick. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with |
It doesn't reproduce with a simple setup. Please provide a reproduction. |
Here's a reproduction - https://github.com/mkilpatrick/vite-ssr-react-base/tree/url-space. Start up the server and go to http://localhost:5173/about vs http://localhost:5173/about%20me. It's related to inline modules and SSR.
It's happening in the vite:html-inline-proxy |
It seems there is an inconsistency of vite/packages/vite/src/node/plugins/html.ts Lines 62 to 66 in 937cecc
It reproduces with #9054 (comment), too. |
Describe the bug
Making a request in SSR mode to
http://localhost:5173/indextest/dangiel1
leads to the req.originalUrl looking like/indextest/dangiel1
but making a request to
http://localhost:5173/index%20test/dangiel1
(note the %20 space) leads to:/@id/__x00__/index%20test/dangiel1
Reproduction
N/A
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: