We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
astro
2.0.2
node
npm
Windows
The resource will request fail when the path has Chinese on SSR mode with node. Only appear on build output server.
Maybe other language also has this problem?
I found that in the output server, the path will be encode one time:
astro/packages/integrations/node/src/http-server.ts
Line 22 in f05eb9f
But when the browser send the request with Chinese path, it has been encoded. But with second time encoded, it makes path become incorrent.
Maybe should change like this:
const stream = send(req, encodeURI(decodeURI(pathname)), { root: fileURLToPath(client), dotfiles: pathname.startsWith('/.well-known/') ? 'allow' : 'deny', });
https://github.com/QingXia-Ela/astro-bug-demo
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
What version of
astro
are you using?2.0.2
Are you using an SSR adapter? If so, which one?
node
What package manager are you using?
npm
What operating system are you using?
Windows
Describe the Bug
The resource will request fail when the path has Chinese on SSR mode with node. Only appear on build output server.
Maybe other language also has this problem?
I found that in the output server, the path will be encode one time:
astro/packages/integrations/node/src/http-server.ts
Line 22 in f05eb9f
But when the browser send the request with Chinese path, it has been encoded. But with second time encoded, it makes path become incorrent.
Maybe should change like this:
Link to Minimal Reproducible Example
https://github.com/QingXia-Ela/astro-bug-demo
Participation
The text was updated successfully, but these errors were encountered: