mirror of
https://github.com/Hopiu/django.git
synced 2026-03-27 03:10:23 +00:00
[py3] Fixed HTTP header serialization
This commit is contained in:
parent
de2cb5fede
commit
4d393e1bd9
1 changed files with 1 additions and 1 deletions
|
|
@ -550,7 +550,7 @@ class HttpResponse(object):
|
|||
def serialize(self):
|
||||
"""Full HTTP message, including headers, as a bytestring."""
|
||||
headers = [
|
||||
b'%s: %s' % (key.encode('us-ascii'), value.encode('us-ascii'))
|
||||
('%s: %s' % (key, value)).encode('us-ascii')
|
||||
for key, value in self._headers.values()
|
||||
]
|
||||
return b'\r\n'.join(headers) + b'\r\n\r\n' + self.content
|
||||
|
|
|
|||
Loading…
Reference in a new issue