1
0
Эх сурвалжийг харах

Merge pull request #502 from Unrud/patch-40

Plain text for GET / instead of malformed HTML
Guillaume Ayoub 9 жил өмнө
parent
commit
8d92b371e4
1 өөрчлөгдсөн 1 нэмэгдсэн , 3 устгасан
  1. 1 3
      radicale/__init__.py

+ 1 - 3
radicale/__init__.py

@@ -422,9 +422,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 = "<!DOCTYPE html>\n<title>Radicale</title>Radicale 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):