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.

Author Jonathan Kamens
Recipients Jonathan Kamens
Date 2015-05-26.20:18:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432671481.51.0.762064908488.issue24291@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-05-26 20:18:01Jonathan Kamenssetrecipients: + Jonathan Kamens
2015-05-26 20:18:01Jonathan Kamenssetmessageid: <1432671481.51.0.762064908488.issue24291@psf.upfronthosting.co.za>
2015-05-26 20:18:01Jonathan Kamenslinkissue24291 messages
2015-05-26 20:18:01Jonathan Kamenscreate