Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[py3] Fixed HTTP header serialization

  • Loading branch information...
commit 4d393e1bd979984dbafa8fd040aae6223209565e 1 parent de2cb5f
@claudep claudep authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/http/__init__.py
View
2  django/http/__init__.py
@@ -550,7 +550,7 @@ def __init__(self, content='', content_type=None, status=None,
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
Please sign in to comment.
Something went wrong with that request. Please try again.