[FIX] content-type of JSON-RPC2 responses

bzr revid: xmo@openerp.com-20110317155914-rh3w4puch88o2h77
This commit is contained in:
Xavier Morel 2011-03-17 16:59:14 +01:00
parent d51d885c77
commit 5298cde953
1 changed files with 5 additions and 1 deletions

View File

@ -148,7 +148,11 @@ class JsonRequest(object):
print "<--", response
print
return simplejson.dumps(response)
content = simplejson.dumps(response)
cherrypy.response.headers['Content-Type'] = 'application/json'
cherrypy.response.headers['Content-Length'] = len(content)
return content
def jsonrequest(f):
@cherrypy.expose