From 255920fad93b160d8bcc41d1a9cae6cb339a6b66 Mon Sep 17 00:00:00 2001 From: Martijn Voncken Date: Sat, 12 Jul 2008 06:54:36 +0000 Subject: [PATCH] json, add header --- deluge/ui/webui/json_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/ui/webui/json_api.py b/deluge/ui/webui/json_api.py index a7b5dac68..692ed0080 100644 --- a/deluge/ui/webui/json_api.py +++ b/deluge/ui/webui/json_api.py @@ -65,11 +65,12 @@ class json_rpc: def POST(self , name=None): + web.header("Content-Type", "application/x-json") ck = cookies() if not(ck.has_key("session_id") and ck["session_id"] in utils.SESSIONS): print """{"error":{ "number":1, - "message":"not authenticated" + "message":"not authenticated", "error":"not authenticated" } }