From b1344dec15e29281752df81a1273ab0b17451583 Mon Sep 17 00:00:00 2001 From: Benjamin Braatz Date: Tue, 10 Aug 2021 20:47:37 +0200 Subject: [PATCH] Repair redirect to trailing slash. --- controlpi_plugins/wsserver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.34.1