mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 16:38:43 +00:00
json, add header
This commit is contained in:
parent
e6a8123939
commit
255920fad9
1 changed files with 2 additions and 1 deletions
|
@ -65,11 +65,12 @@ class json_rpc:
|
||||||
|
|
||||||
|
|
||||||
def POST(self , name=None):
|
def POST(self , name=None):
|
||||||
|
web.header("Content-Type", "application/x-json")
|
||||||
ck = cookies()
|
ck = cookies()
|
||||||
if not(ck.has_key("session_id") and ck["session_id"] in utils.SESSIONS):
|
if not(ck.has_key("session_id") and ck["session_id"] in utils.SESSIONS):
|
||||||
print """{"error":{
|
print """{"error":{
|
||||||
"number":1,
|
"number":1,
|
||||||
"message":"not authenticated"
|
"message":"not authenticated",
|
||||||
"error":"not authenticated"
|
"error":"not authenticated"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue