From f875bcd892eb7a0bb227a3ac526c7d9c6a9aac3b Mon Sep 17 00:00:00 2001 From: Unrud Date: Wed, 31 Aug 2016 02:01:18 +0200 Subject: [PATCH] Plain text for GET / instead of malformed HTML It's basically the same in browsers and looks nicer in tools that don't support HTML rendering (like curl). --- radicale/__init__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/radicale/__init__.py b/radicale/__init__.py index 1741cd2..3396e43 100644 --- a/radicale/__init__.py +++ b/radicale/__init__.py @@ -421,9 +421,7 @@ class Application: """Manage GET request.""" # Display a "Radicale works!" message if the root URL is requested if not path.strip("/"): - headers = {"Content-type": "text/html"} - answer = "\nRadicaleRadicale works!" - return client.OK, headers, answer + return client.OK, {"Content-type": "text/plain"}, "Radicale works!" if not self._access(user, path, "r"): return NOT_ALLOWED with self.Collection.acquire_lock("r", user):