changeset 1475:83cd4862b134

server: fix args range in checkRedirection
author Goffi <goffi@goffi.org>
date Wed, 20 Oct 2021 17:15:40 +0200
parents c36490a98817
children c669b5bfb8a0
files libervia/server/server.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/server/server.py	Wed Oct 20 12:25:06 2021 +0200
+++ b/libervia/server/server.py	Wed Oct 20 17:15:40 2021 +0200
@@ -1730,7 +1730,7 @@
         """
         inv_redirections = vhost_root.inv_redirections
         url_parts = url_path.strip("/").split("/")
-        for idx in range(len(url_parts), 0, -1):
+        for idx in range(len(url_parts), -1, -1):
             test_url = "/" + "/".join(url_parts[:idx])
             if test_url in inv_redirections:
                 rem_url = url_parts[idx:]