From 6d78ad53c6c350858236d703dbc7a9731f316762 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 27 Sep 2023 23:30:26 +0200 Subject: [PATCH] Fix path decoding. --- scripts/autoserve.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/autoserve.py b/scripts/autoserve.py index 87d6b41..824a26c 100644 --- a/scripts/autoserve.py +++ b/scripts/autoserve.py @@ -8,6 +8,8 @@ import os import time import select +import urllib.parse + import inotify.adapters PORT = int(os.getenv('PORT', 8000)) @@ -55,7 +57,7 @@ class Server(http.server.SimpleHTTPRequestHandler): time.sleep(SLEEP_TIME) return - path = self.path + path = urllib.parse.unquote(self.path) if path.strip('/') == '': path = '/index.html' if os.path.isdir(path.strip('/')):