summaryrefslogtreecommitdiff
path: root/Lib/httplib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-09-29 17:48:18 +0000
committerAntoine Pitrou <solipsis@pitrou.net>2009-09-29 17:48:18 +0000
commit7248178cd9efb2e568ba71f3293f3be23ef05e5d (patch)
treee5195e03b35fba77f3d36678239498703ce3fc51 /Lib/httplib.py
parent9ebd242fbbd2c52fcf314e22f6b5bf57954d52cd (diff)
downloadcpython-git-7248178cd9efb2e568ba71f3293f3be23ef05e5d.tar.gz
Issue #6790: Make it possible again to pass an `array.array` to
`httplib.HTTPConnection.send`. Patch by Kirk McDonald.
Diffstat (limited to 'Lib/httplib.py')
-rw-r--r--Lib/httplib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/httplib.py b/Lib/httplib.py
index 30cabcef2b..a83245bb93 100644
--- a/Lib/httplib.py
+++ b/Lib/httplib.py
@@ -66,6 +66,7 @@ Req-started-unread-response _CS_REQ_STARTED <response_class>
Req-sent-unread-response _CS_REQ_SENT <response_class>
"""
+from array import array
import socket
from sys import py3kwarning
from urlparse import urlsplit
@@ -747,7 +748,7 @@ class HTTPConnection:
print "send:", repr(str)
try:
blocksize=8192
- if hasattr(str,'read') :
+ if hasattr(str,'read') and not isinstance(str, array):
if self.debuglevel > 0: print "sendIng a read()able"
data=str.read(blocksize)
while data: