mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-06 08:33:56 +00:00
json, add header
This commit is contained in:
parent
e6a8123939
commit
255920fad9
@ -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…
x
Reference in New Issue
Block a user