version middleware: use application/json for mime-type

This commit is contained in:
Benjamin Dauvergne 2013-05-13 17:28:41 +02:00
parent 07c1be37a6
commit 1d459c9d73
2 changed files with 2 additions and 2 deletions

View File

@ -10,5 +10,5 @@ class VersionMiddleware:
if request.method == 'GET' and request.path == '/__version__':
packages_version = middleware.VersionMiddleware.get_packages_version()
return HttpResponse(json.dumps(packages_version),
content_type='text/json')
content_type='application/json')
return None

View File

@ -26,7 +26,7 @@ class VersionMiddleware(object):
method = environ.get('REQUEST_METHOD', 'GET')
if method == 'GET' and path == '/__version__':
packages_version = self.get_packages_version()
start_response('200 Ok', [('content-type', 'text/json')])
start_response('200 Ok', [('content-type', 'application/json')])
return [json.dumps(packages_version)]
return self.application(environ, start_response)