From ed44830447224d13fb2d2639cf1297e41ec5c511 Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 24 Dec 2015 08:24:55 +0100 Subject: [PATCH] Error message if path not starting with prefix Before the program crashed implicitly --- radicale/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 97be760..12932e8 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -265,7 +265,9 @@ class Application(object): # Request path not starting with base_prefix, not allowed log.LOGGER.debug( "Path not starting with prefix: %s", environ["PATH_INFO"]) - environ["PATH_INFO"] = None + status, headers, _ = NOT_ALLOWED + start_response(status, list(headers.items())) + return [] # Sanitize request URI environ["PATH_INFO"] = self.sanitize_uri(environ["PATH_INFO"])