Comment 2 for bug 1466549

Revision history for this message
Romain LE DISEZ (rledisez) wrote : Re: Download DLO objects leak connections when client kill connection

Based on
"If the iterable returned by the application has a close() method, the server or gateway must call that method upon completion of the current request, whether the request was completed normally, or terminated early due to an error. (This is to support resource release by the application. This protocol is intended to complement PEP 325 's generator support, and other common iterables with close() methods."

here is a fix proposal :

It passes all tests, but I'm not very familiar with wsgi. So i don't know all the implications of adding a close() method.