From b0f8397b997d8800be5de99ca3f80b18da40496f Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Mon, 22 May 2017 13:13:15 +0200 Subject: [PATCH] Fix: SCRIPT_NAME is not stripped from collections path. --- radicale/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/radicale/__init__.py b/radicale/__init__.py index d268ae0aa..454b108d9 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -356,6 +356,9 @@ def response(status, headers=(), answer=None): environ["PATH_INFO"] = storage.sanitize_path(environ["PATH_INFO"]) self.logger.debug("Sanitized path: %s", environ["PATH_INFO"]) path = environ["PATH_INFO"] + if base_prefix: + path = path[len(base_prefix):] + self.logger.debug("Using collection path: %s", path) # Get function corresponding to method function = getattr(self, "do_%s" % environ["REQUEST_METHOD"].upper())