[New-bugs-announce] [issue16220] wsgiref does not call close() on iterable response when client

Brent Tubbs report at bugs.python.org
Sat Oct 13 23:00:20 CEST 2012


New submission from Brent Tubbs:

When a WSGI application returns an iterable that has a .close() method, the server is supposed to call that method once the request has finished.  The wsgiref server does not do this when a client disconnects from a streaming response.

The attached script allows testing the .close() behavior of various wsgi servers (wsgiref, cherrypy, gevent, werkzeug, and gunicorn).  wsgiref is the only one of the tested implementations that does not call .close().

----------
components: Library (Lib)
files: sleepy_app.py
messages: 172830
nosy: Brent.Tubbs
priority: normal
severity: normal
status: open
title: wsgiref does not call close() on iterable response when client
versions: Python 2.7
Added file: http://bugs.python.org/file27555/sleepy_app.py

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


More information about the New-bugs-announce mailing list