[issue21890] wsgiref.simple_server doesn't accept empty bytes before start_response is called
Robin Schoonover
report at bugs.python.org
Wed Jul 2 23:54:21 CEST 2014
Robin Schoonover added the comment:
Fair enough, I misled myself.
However, and I feel like I'm getting really picky here, but it still doesn't fulfill the paragraph I quoted:
def application(environ, start_response):
start_response('200 OK',
[('Content-type', 'text/plain')])
yield b''
try:
# produce an exception tuple, so we can re-call s_r
raise RuntimeError
except RuntimeError:
# Headers shouldn't have been sent, but they were
# so this will throw:
start_response('200 OK',
[('Content-type', 'text/plain')],
sys.exc_info())
yield b'error data or whatever'
But if async support a foregone conclusion anyway, is it worth bothering complying with that odd requirement?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21890>
_______________________________________
More information about the Python-bugs-list
mailing list