[FIX] a typo between 'id' and builtin <id>.

bzr revid: florent.xicluna@gmail.com-20120118190409-ddg3bbvb7r9jzyjc
This commit is contained in:
Florent Xicluna 2012-01-18 20:04:09 +01:00
parent 4910de7f3c
commit d0eb54d4c4
1 changed files with 3 additions and 3 deletions

View File

@ -142,11 +142,11 @@ class JsonRequest(WebRequest):
jsonp = args.get('jsonp')
requestf = None
request = None
request_id = args.get('id')
if jsonp and self.httprequest.method == 'POST':
# jsonp 2 steps step1 POST: save call
self.init(args)
request_id = args.get('id')
self.session.jsonp_requests[request_id] = self.httprequest.form['r']
headers=[('Content-Type', 'text/plain; charset=utf-8')]
r = werkzeug.wrappers.Response(request_id, headers=headers)
@ -154,10 +154,10 @@ class JsonRequest(WebRequest):
elif jsonp and args.get('r'):
# jsonp method GET
request = args.get('r')
elif jsonp and args.get('id'):
elif jsonp and request_id:
# jsonp 2 steps step2 GET: run and return result
self.init(args)
request = self.session.jsonp_requests.pop(args.get(id), "")
request = self.session.jsonp_requests.pop(request_id, "")
else:
# regular jsonrpc2
requestf = self.httprequest.stream