[New-bugs-announce] [issue16658] Missing "return" in HTTPConnection.send()
Amaury Forgeot d'Arc
report at bugs.python.org
Mon Dec 10 21:14:32 CET 2012
New submission from Amaury Forgeot d'Arc:
HTTPConnection.send() accepts a bytes string, a file, and any iterable.
When a file is passed, data is read in blocks until read() returns an empty string.
But because a "return" statement is missing, execution continues with an attempt to iterate the file again...
This exits quickly most of the time, but this can lead to surprising behavior if more data is available, or for custom implementations of the file object.
title: Missing "return" in HTTPConnection.send()
versions: Python 3.2, Python 3.3
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce