diff options
author | AleksandrukTad <t.aleksandruk@gmail.com> | 2019-12-10 12:11:55 +0000 |
---|---|---|
committer | Ry Dahl <ry@tinyclouds.org> | 2019-12-10 20:11:55 +0800 |
commit | 31ddfd5a42d658b92e954e44d3326a8e37ac9198 (patch) | |
tree | fddcbb19c78790cbfced08c855e3aa697f31d129 /std/http/file_server.ts | |
parent | ec7f3ce1c27d7c2d231a75d6a4eea82867d7ad2b (diff) |
fix: decoding uri in file_server (#3187)
Diffstat (limited to 'std/http/file_server.ts')
-rwxr-xr-x | std/http/file_server.ts | 4 |
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()) { |