Fix path decoding.
This commit is contained in:
parent
00cb3fa203
commit
6d78ad53c6
@ -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('/')):
|
||||
|
Loading…
Reference in New Issue
Block a user