diff mercurial/hgweb/wsgicgi.py @ 5577:e0173902c813

CGI compatibility fix for d74fc8dec2b4.
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Sat, 01 Dec 2007 18:26:27 +0100
parents be591b740e0f
children e15f7db0f0ee
line wrap: on
line diff
--- a/mercurial/hgweb/wsgicgi.py	Fri Nov 30 18:23:18 2007 +0100
+++ b/mercurial/hgweb/wsgicgi.py	Sat Dec 01 18:26:27 2007 +0100
@@ -61,13 +61,4 @@
         headers_set[:] = [status, response_headers]
         return write
 
-    result = application(environ, start_response)
-    try:
-        for data in result:
-            if data:    # don't send headers until body appears
-                write(data)
-        if not headers_sent:
-            write('')   # send headers now if body was empty
-    finally:
-        if hasattr(result,'close'):
-            result.close()
+    application(environ, start_response)