[issue24291] wsgiref.handlers.SimpleHandler truncates large output blobs

Martin Panter report at bugs.python.org
Sun Apr 3 19:56:52 EDT 2016


Martin Panter added the comment:

My worry was that it is easy to make a write() method that does not return anything, but is still useful in most cases. Since BufferedIOBase.write() has to guarantee to write everything, it may not seem important to return a value. But we could explicitly check for None as you suggested.

In the BaseHandler class, each chunk yielded by the application is passed to BaseHandler.write(). But that method calls self._flush(), which should avoid any buffering problem. SimpleHandler._flush() implements this by calling self.stdout.flush().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24291>
_______________________________________


More information about the Python-bugs-list mailing list