[py3] Fixed HTTP header serialization
This commit is contained in:
parent
de2cb5fede
commit
4d393e1bd9
|
@ -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 New Issue