[issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called
PJ Eby
report at bugs.python.org
Thu Jul 3 00:26:54 CEST 2014
PJ Eby added the comment:
You're right, it shouldn't send the headers until a non-empty string
occurs. I don't see any problem with treating it as a bug, and fixing it.
Your patch will also allow non-compliant behavior, though. It seems to me
it would be better to fix the logic in write() to not call send_headers()
if len(data)==0. That way, it will still error with "write() before
start_response()" in the non-compliant case, but fix the compliance error.
Feel free to reopen/retitle this issue for that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21890>
_______________________________________
More information about the Python-bugs-list
mailing list