[FIX] NameError in jsonp POST.

bzr revid: florent.xicluna@gmail.com-20120116145524-razqfr39bf4b4t9v
This commit is contained in:
Florent Xicluna 2012-01-16 15:55:24 +01:00
parent 2606558efa
commit 4910de7f3c
1 changed files with 2 additions and 1 deletions

View File

@ -146,7 +146,8 @@ class JsonRequest(WebRequest):
if jsonp and self.httprequest.method == 'POST':
# jsonp 2 steps step1 POST: save call
self.init(args)
req.session.jsonp_requests[args.get('id')] = self.httprequest.form['r']
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)
return r