This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: http.client fails sending read()able Object
Type: behavior Stage: resolved
Components: None Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Missing "return" in HTTPConnection.send()
View: 16658
Assigned To: Nosy List: BreamoreBoy, Tobias.Steinrücken, orsenthil
Priority: normal Keywords:

Created on 2012-05-03 10:31 by Tobias.Steinrücken, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg159845 - (view) Author: Tobias Steinrücken (Tobias.Steinrücken) Date: 2012-05-03 10:31
It seems that http.client's send() function lacks an else/return statement in Line 772.
If this method is called with an read()able Object, it jumps into 

L 750: if hasattr( data,"read"):

processes this data correctly, but then falls through (due to missing else ) to

L 773: try:
L 774:     self.socket.sendall(data)

where finally an TypeError raises.
msg222251 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2014-07-04 00:41
Can we have a response to this please.
History
Date User Action Args
2022-04-11 14:57:29adminsetgithub: 58914
2014-07-04 00:45:12ned.deilysetstatus: open -> closed
superseder: Missing "return" in HTTPConnection.send()
resolution: duplicate
stage: resolved
2014-07-04 00:41:22BreamoreBoysetnosy: + BreamoreBoy

messages: + msg222251
versions: + Python 3.4, Python 3.5, - Python 3.2
2012-05-03 10:55:03pitrousetnosy: + orsenthil
2012-05-03 10:31:37Tobias.Steinrückencreate