summaryrefslogtreecommitdiff
path: root/std/http/file_server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/http/file_server.ts')
-rwxr-xr-xstd/http/file_server.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/std/http/file_server.ts b/std/http/file_server.ts
index fb8f28081..41aac5e45 100755
--- a/std/http/file_server.ts
+++ b/std/http/file_server.ts
@@ -285,10 +285,10 @@ listenAndServe(
addr,
async (req): Promise<void> => {
const normalizedUrl = posix.normalize(req.url);
- const fsPath = posix.join(target, normalizedUrl);
+ const decodedUrl = decodeURIComponent(normalizedUrl);
+ const fsPath = posix.join(target, decodedUrl);
let response: Response;
-
try {
const info = await stat(fsPath);
if (info.isDirectory()) {