mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #33567 -- Avoided setting default text/html content type on responses.
This commit is contained in:
committed by
Carlton Gibson
parent
3dbf46654c
commit
93803a1b5f
@@ -375,6 +375,7 @@ class CsrfViewMiddlewareTestMixin(CsrfFunctionTestMixin):
|
||||
with self.assertLogs("django.security.csrf", "WARNING") as cm:
|
||||
resp = mw.process_view(req, post_form_view, (), {})
|
||||
self.assertEqual(403, resp.status_code)
|
||||
self.assertEqual(resp["Content-Type"], "text/html; charset=utf-8")
|
||||
self.assertEqual(cm.records[0].getMessage(), "Forbidden (%s): " % expected)
|
||||
|
||||
def test_csrf_cookie_bad_or_missing_token(self):
|
||||
|
||||
Reference in New Issue
Block a user