From edaf21561d3b2cdae621695473becc55ec685320 Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 31 May 2017 12:01:37 +0200 Subject: [PATCH] Don't strip SCRIPT_NAME from PATH_INFO --- radicale/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 0ff1bb4c..4fff67e7 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -378,10 +378,9 @@ class Application: if environ["PATH_INFO"]: environ["PATH_INFO"] = storage.sanitize_path(environ["PATH_INFO"]) self.logger.debug("Sanitized path: %r", environ["PATH_INFO"]) + # SCRIPT_NAME is already removed from PATH_INFO, according to the + # WSGI specification. path = environ["PATH_INFO"] - if base_prefix and path.startswith(base_prefix): - path = path[len(base_prefix):] - self.logger.debug("Stripped script name from path: %s", path) # Get function corresponding to method function = getattr(self, "do_%s" % environ["REQUEST_METHOD"].upper())