diff -r 568312ea04fa Lib/wsgiref/handlers.py --- a/Lib/wsgiref/handlers.py Sun Oct 14 04:17:50 2012 +0200 +++ b/Lib/wsgiref/handlers.py Sun Oct 14 01:30:19 2012 -0700 @@ -174,11 +174,13 @@ in the event loop to iterate over the data, and to call 'self.close()' once the response is finished. """ - if not self.result_is_file() or not self.sendfile(): - for data in self.result: - self.write(data) - self.finish_content() - self.close() + try: + if not self.result_is_file() or not self.sendfile(): + for data in self.result: + self.write(data) + self.finish_content() + finally: + self.close() def get_scheme(self): diff -r 568312ea04fa Misc/ACKS --- a/Misc/ACKS Sun Oct 14 04:17:50 2012 +0200 +++ b/Misc/ACKS Sun Oct 14 01:30:19 2012 -0700 @@ -1177,6 +1177,7 @@ Matthias Troffaes John Tromp Jason Trowbridge +Brent Tubbs Anthony Tuininga Erno Tukia David Turner