Message244131
The _write method of wsgiref.handlers.SimpleHandler reads as follows:
def _write(self,data):
self.stdout.write(data)
The problem here is that calling write() on a socket is not actually guaranteed to write all of the data in the buffer. If the length of data is large enough, then the kernel will take only part of it. In that case, the rest of the response data will be silently discarded by wsgiref.
_write needs to check the return value of self.stdout.write(data), and if it is less than the length of data, repeat the write from the middle of the data buffer, etc., until all the data has been written. |
|
Date |
User |
Action |
Args |
2015-05-26 20:18:01 | Jonathan Kamens | set | recipients:
+ Jonathan Kamens |
2015-05-26 20:18:01 | Jonathan Kamens | set | messageid: <1432671481.51.0.762064908488.issue24291@psf.upfronthosting.co.za> |
2015-05-26 20:18:01 | Jonathan Kamens | link | issue24291 messages |
2015-05-26 20:18:01 | Jonathan Kamens | create | |
|