[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

Serhiy Storchaka report at bugs.python.org
Thu Jun 2 15:21:18 EDT 2016


Serhiy Storchaka added the comment:

It looks to me that there is two opposite ways to resolve this issue.

1. Document the requirement for write() and raise an exception if write() returned not the size of full data. But I think it would be more user-friendly first emit a warning and continue calling write() until full data is written.

2. Don't document any requirement, but just silently handle partial writing.

wsgiref-only.patch contains parts from both ways. It documents new requirement, but doesn't deprecate partial writing. What way is chosen?

----------

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


More information about the Python-bugs-list mailing list