summaryrefslogtreecommitdiffstats
path: root/Lib/http
diff options
context:
space:
mode:
authorSenthil Kumaran <orsenthil@gmail.com>2010-10-03 18:25:01 (GMT)
committerSenthil Kumaran <orsenthil@gmail.com>2010-10-03 18:25:01 (GMT)
commit97304567a785e4f2fafc394c5029c8411c7d5012 (patch)
treed1f846d9fbda9790da2aa73727c9c218a4ff8994 /Lib/http
parent5e8826cd981b7bfba8f5f28cddc602bb211fb2f8 (diff)
downloadcpython-97304567a785e4f2fafc394c5029c8411c7d5012.zip
cpython-97304567a785e4f2fafc394c5029c8411c7d5012.tar.gz
cpython-97304567a785e4f2fafc394c5029c8411c7d5012.tar.bz2
Merged revisions 85205 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85205 | senthil.kumaran | 2010-10-03 23:52:42 +0530 (Sun, 03 Oct 2010) | 3 lines Fix Issue10012 - httplib headers, which are (sometimes mistakenly) int are explicitly cast to str (bytes - in py3k). ........
Diffstat (limited to 'Lib/http')
-rw-r--r--Lib/http/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/http/client.py b/Lib/http/client.py
index 9348870..f273b03 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -916,6 +916,8 @@ class HTTPConnection:
for i, one_value in enumerate(values):
if hasattr(one_value, 'encode'):
values[i] = one_value.encode('ascii')
+ elif isinstance(one_value, int):
+ values[i] = str(one_value).encode('ascii')
value = b'\r\n\t'.join(values)
header = header + b': ' + value
self._output(header)