Message177312
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. |
|
Date |
User |
Action |
Args |
2012-12-10 20:14:32 | amaury.forgeotdarc | set | recipients:
+ amaury.forgeotdarc |
2012-12-10 20:14:32 | amaury.forgeotdarc | set | messageid: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> |
2012-12-10 20:14:32 | amaury.forgeotdarc | link | issue16658 messages |
2012-12-10 20:14:31 | amaury.forgeotdarc | create | |
|