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
@@ -101,8 +101,10 @@ class FileResponseTests(SimpleTestCase):
|
||||
self.assertEqual(response.headers["Content-Type"], "video/webm")
|
||||
|
||||
def test_content_type_buffer_explicit_default(self):
|
||||
response = FileResponse(io.BytesIO(b"binary content"), content_type="text/html")
|
||||
self.assertEqual(response.headers["Content-Type"], "text/html")
|
||||
response = FileResponse(
|
||||
io.BytesIO(b"binary content"), content_type="text/html; charset=utf-8"
|
||||
)
|
||||
self.assertEqual(response.headers["Content-Type"], "text/html; charset=utf-8")
|
||||
|
||||
def test_content_type_buffer_named(self):
|
||||
test_tuples = (
|
||||
|
||||
Reference in New Issue
Block a user