Merge pull request #192 from david-ford/working-branch

Fix case sensitive check to be case insensitive
This commit is contained in:
Lincoln Stein 2022-08-29 17:48:12 -04:00 committed by GitHub
commit 81ad239197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ class DreamServer(BaseHTTPRequestHandler):
self.wfile.write(content.read())
else:
path = "." + self.path
cwd = os.getcwd()
cwd = os.path.realpath(os.getcwd())
is_in_cwd = os.path.commonprefix((os.path.realpath(path), cwd)) == cwd
if not (is_in_cwd and os.path.exists(path)):
self.send_response(404)