Message186794
I don't think this is a bug anymore in the codebase- looking at Lib/http/client.py, if hasattr(data, "read") is true, then the branch will return unconditionally.
if hasattr(data, "read") :
if self.debuglevel > 0:
print("sendIng a read()able")
encode = False
try:
mode = data.mode
except AttributeError:
# io.BytesIO and other file-like objects don't have a `mode`
# attribute.
pass
else:
if "b" not in mode:
encode = True
if self.debuglevel > 0:
print("encoding file using iso-8859-1")
while 1:
datablock = data.read(blocksize)
if not datablock:
break
if encode:
datablock = datablock.encode("iso-8859-1")
self.sock.sendall(datablock)
return |
|
Date |
User |
Action |
Args |
2013-04-13 18:49:07 | Stephen.Tu | set | recipients:
+ Stephen.Tu, Rosuav, dspublic@freemail.hu |
2013-04-13 18:49:07 | Stephen.Tu | set | messageid: <1365878947.6.0.975293984031.issue17575@psf.upfronthosting.co.za> |
2013-04-13 18:49:07 | Stephen.Tu | link | issue17575 messages |
2013-04-13 18:49:07 | Stephen.Tu | create | |
|