summaryrefslogtreecommitdiffstats
path: root/module/web/middlewares.py
diff options
context:
space:
mode:
Diffstat (limited to 'module/web/middlewares.py')
-rw-r--r--module/web/middlewares.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/module/web/middlewares.py b/module/web/middlewares.py
index b71138e69..a4b962988 100644
--- a/module/web/middlewares.py
+++ b/module/web/middlewares.py
@@ -123,7 +123,11 @@ class GzipResponse(object):
output.close()
finally:
if hasattr(app_iter, 'close'):
- app_iter.close()
+ try:
+ app_iter.close()
+ except :
+ pass
+
content_length = self.buffer.tell()
update_header(self.headers, "Content-Length" , str(content_length))
self.start_response(self.status, self.headers) \ No newline at end of file