diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-08-15 13:39:39 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-08-15 13:39:39 +0200 |
| commit | 4d393e1bd979984dbafa8fd040aae6223209565e (patch) | |
| tree | 9efa11d4c6eee8ab7020f3a9d382b708c3eebd3f /django/http | |
| parent | de2cb5fede0766a52717024615cc56a03465fe61 (diff) | |
[py3] Fixed HTTP header serialization
Diffstat (limited to 'django/http')
| -rw-r--r-- | django/http/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/http/__init__.py b/django/http/__init__.py index 930e84cddc..b9c5caa193 100644 --- a/django/http/__init__.py +++ b/django/http/__init__.py @@ -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 |
