From cb5b92cb7a06092243a0bbd9f6b56401bb101556 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Thu, 14 Dec 2023 12:07:43 +0100 Subject: [PATCH] Add check for base_prefix indicating Radicale running at site root (/) Alternative to PR #1310 --- radicale/app/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radicale/app/__init__.py b/radicale/app/__init__.py index 6896bc70..8aa8d870 100644 --- a/radicale/app/__init__.py +++ b/radicale/app/__init__.py @@ -197,7 +197,7 @@ class Application(ApplicationPartDelete, ApplicationPartHead, if base_prefix_src == "HTTP_X_SCRIPT_NAME": return response(*httputils.BAD_REQUEST) return response(*httputils.INTERNAL_SERVER_ERROR) - if base_prefix.endswith("/"): + if base_prefix and base_prefix != "/" and base_prefix.endswith("/"): logger.warning("Base prefix (from %s) must not end with '/': %r", base_prefix_src, base_prefix) base_prefix = base_prefix.rstrip("/")