summaryrefslogtreecommitdiff
path: root/packages/integrations/node/src/http-server.ts
diff options
context:
space:
mode:
authorGravatar Shiina <86217807+QingXia-Ela@users.noreply.github.com> 2023-02-02 02:53:09 +0800
committerGravatar GitHub <noreply@github.com> 2023-02-01 13:53:09 -0500
commit6a03649f0084f0df6738236d4a86c9936325cee7 (patch)
treea3e5a5f3a5e51905ceabe21dbc207c6dbdf9a5b7 /packages/integrations/node/src/http-server.ts
parentf05eb9f8ba078a063e87c60309bbab491a043be4 (diff)
downloadastro-6a03649f0084f0df6738236d4a86c9936325cee7.tar.gz
astro-6a03649f0084f0df6738236d4a86c9936325cee7.tar.zst
astro-6a03649f0084f0df6738236d4a86c9936325cee7.zip
Fix incorrent encoded when path has other language characters (#6088)
* fix: Incorrent encoded when path has Chinese * chore: exec changeset
Diffstat (limited to '')
-rw-r--r--packages/integrations/node/src/http-server.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/integrations/node/src/http-server.ts b/packages/integrations/node/src/http-server.ts
index 19e33c84a..8eea3c170 100644
--- a/packages/integrations/node/src/http-server.ts
+++ b/packages/integrations/node/src/http-server.ts
@@ -19,7 +19,7 @@ export function createServer(
if (req.url) {
let pathname = removeBase(req.url);
pathname = pathname[0] === '/' ? pathname : '/' + pathname;
- const stream = send(req, encodeURI(pathname), {
+ const stream = send(req, encodeURI(decodeURI(pathname)), {
root: fileURLToPath(client),
dotfiles: pathname.startsWith('/.well-known/') ? 'allow' : 'deny',
});