Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[py3] Fixed HTTP header serialization

  • Loading branch information...
commit 4d393e1bd979984dbafa8fd040aae6223209565e 1 parent de2cb5f
Claude Paroz authored August 15, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/http/__init__.py
2  django/http/__init__.py
@@ -550,7 +550,7 @@ def __init__(self, content='', content_type=None, status=None,
550 550
     def serialize(self):
551 551
         """Full HTTP message, including headers, as a bytestring."""
552 552
         headers = [
553  
-            b'%s: %s' % (key.encode('us-ascii'), value.encode('us-ascii'))
  553
+            ('%s: %s' % (key, value)).encode('us-ascii')
554 554
             for key, value in self._headers.values()
555 555
         ]
556 556
         return b'\r\n'.join(headers) + b'\r\n\r\n' + self.content

0 notes on commit 4d393e1

Please sign in to comment.
Something went wrong with that request. Please try again.