diff libervia/server/server.py @ 1475:83cd4862b134

server: fix args range in checkRedirection
author Goffi <goffi@goffi.org>
date Wed, 20 Oct 2021 17:15:40 +0200
parents d6062cccd4c0
children 595e7fef41f3
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:]