mirror of
https://github.com/python/cpython.git
synced 2025-09-13 20:27:05 +00:00
Issue #6790: Make it possible again to pass an array.array
to
`httplib.HTTPConnection.send`. Patch by Kirk McDonald.
This commit is contained in:
parent
9ebd242fbb
commit
7248178cd9
4 changed files with 22 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue