mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #5897 -- Added the Content-Length response header in CommonMiddleware
Thanks Tim Graham for the review.
This commit is contained in:
@@ -41,11 +41,12 @@ class WSGITest(SimpleTestCase):
|
||||
|
||||
self.assertEqual(response_data["status"], "200 OK")
|
||||
self.assertEqual(
|
||||
response_data["headers"],
|
||||
[('Content-Type', 'text/html; charset=utf-8')])
|
||||
self.assertEqual(
|
||||
bytes(response),
|
||||
b"Content-Type: text/html; charset=utf-8\r\n\r\nHello World!")
|
||||
set(response_data["headers"]),
|
||||
{('Content-Length', '12'), ('Content-Type', 'text/html; charset=utf-8')})
|
||||
self.assertTrue(bytes(response) in [
|
||||
b"Content-Length: 12\r\nContent-Type: text/html; charset=utf-8\r\n\r\nHello World!",
|
||||
b"Content-Type: text/html; charset=utf-8\r\nContent-Length: 12\r\n\r\nHello World!"
|
||||
])
|
||||
|
||||
def test_file_wrapper(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user