diff --git a/webapp-django/crashstats/api/views.py b/webapp-django/crashstats/api/views.py index aa19f93977..705d9a18f7 100644 --- a/webapp-django/crashstats/api/views.py +++ b/webapp-django/crashstats/api/views.py @@ -526,4 +526,4 @@ def crash_verify(request): # NOTE(willkg): This doesn't check postgres because that's being phased # out. - return http.HttpResponse(json.dumps(data), content_type='text/json') + return http.HttpResponse(json.dumps(data), content_type='application/json') diff --git a/webapp-django/crashstats/crashstats/tests/test_views.py b/webapp-django/crashstats/crashstats/tests/test_views.py index 2aa9fac395..70b2a530a3 100644 --- a/webapp-django/crashstats/crashstats/tests/test_views.py +++ b/webapp-django/crashstats/crashstats/tests/test_views.py @@ -2766,7 +2766,7 @@ def test_version_no_file(self, tmpdir): client = Client() resp = client.get(reverse('crashstats:dockerflow_version')) assert resp.status_code == 200 - assert resp['Content-Type'] == 'text/json' + assert resp['Content-Type'] == 'application/json' assert resp.content == '{}' def test_version_with_file(self, tmpdir): @@ -2781,5 +2781,5 @@ def test_version_with_file(self, tmpdir): client = Client() resp = client.get(reverse('crashstats:dockerflow_version')) assert resp.status_code == 200 - assert resp['Content-Type'] == 'text/json' + assert resp['Content-Type'] == 'application/json' assert resp.content == text diff --git a/webapp-django/crashstats/crashstats/views.py b/webapp-django/crashstats/crashstats/views.py index d932307a96..2a1b6a3a26 100644 --- a/webapp-django/crashstats/crashstats/views.py +++ b/webapp-django/crashstats/crashstats/views.py @@ -1023,7 +1023,7 @@ def dockerflow_version(requst): data = fp.read() else: data = '{}' - return http.HttpResponse(data, content_type='text/json') + return http.HttpResponse(data, content_type='application/json') @pass_default_context