From: Benjamin Braatz Date: Tue, 10 Aug 2021 18:47:37 +0000 (+0200) Subject: Repair redirect to trailing slash. X-Git-Tag: v0.3.0~16 X-Git-Url: http://git.graph-it.com/?a=commitdiff_plain;h=b1344dec15e29281752df81a1273ab0b17451583;p=graphit%2Fcontrolpi-wsserver.git Repair redirect to trailing slash. --- diff --git a/controlpi_plugins/wsserver.py b/controlpi_plugins/wsserver.py index 981f7e2..0ede443 100644 --- a/controlpi_plugins/wsserver.py +++ b/controlpi_plugins/wsserver.py @@ -152,7 +152,7 @@ class WSServer(BasePlugin): relative_path = path[len(start_path):] location = os.path.join(location_path, relative_path) if location: - if os.path.isdir(location) and not location.endswith('/'): + if os.path.isdir(location) and not path.endswith('/'): status = http.HTTPStatus.MOVED_PERMANENTLY response_headers['Location'] = path + '/' else: