set directly 'application/json' to avoid a call to contenttype
This commit is contained in:
+1
-1
@@ -627,7 +627,7 @@ class Response(Storage):
|
|||||||
|
|
||||||
def json(self, data, default=None):
|
def json(self, data, default=None):
|
||||||
if 'Content-Type' not in self.headers:
|
if 'Content-Type' not in self.headers:
|
||||||
self.headers['Content-Type'] = contenttype('.json')
|
self.headers['Content-Type'] = 'application/json'
|
||||||
return json(data, default=default or custom_json)
|
return json(data, default=default or custom_json)
|
||||||
|
|
||||||
def xmlrpc(self, request, methods):
|
def xmlrpc(self, request, methods):
|
||||||
|
|||||||
Reference in New Issue
Block a user