[issue16220] wsgiref does not call close() on iterable response

2012-10-17 Thread Brent Tubbs
Brent Tubbs added the comment: Updated patch with test attached. -- Added file: http://bugs.python.org/file27608/wsgiref_close_plus_test.patch ___ Python tracker <http://bugs.python.org/issue16

[issue16220] wsgiref does not call close() on iterable response

2012-10-14 Thread Brent Tubbs
Brent Tubbs added the comment: You guessed it Graham! Bob Brewer pointed me to your post while I was fighting with this, which led me to testing the behavior under various servers and finding the wsgiref issue. Current Django trunk doesn't have its own finish_response anymore for th

[issue16220] wsgiref does not call close() on iterable response

2012-10-14 Thread Brent Tubbs
Brent Tubbs added the comment: Patch attached. I ran into this while trying to figure out why close() wasn't being called while running the Django dev server, which inherits from wsgiref's BaseHandler. So I'm also surprised that it's gone unnoticed so long. Thanks for

[issue16220] wsgiref does not call close() on iterable response

2012-10-13 Thread Brent Tubbs
Changes by Brent Tubbs : -- title: wsgiref does not call close() on iterable response when client -> wsgiref does not call close() on iterable response ___ Python tracker <http://bugs.python.org/issu

[issue16220] wsgiref does not call close() on iterable response when client

2012-10-13 Thread Brent Tubbs
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