summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/shaggy-gifts-beg.md5
-rw-r--r--packages/integrations/node/src/http-server.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/shaggy-gifts-beg.md b/.changeset/shaggy-gifts-beg.md
new file mode 100644
index 000000000..cda46e047
--- /dev/null
+++ b/.changeset/shaggy-gifts-beg.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/node': patch
+---
+
+fix incorrent encoded when path has other language characters
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',
});