# HG changeset patch
# User Dirkjan Ochtman <dirkjan@ochtman.nl>
# Date 2008-01-18 18:53:38
# Node ID 41a3fce17625e6c675ff84ce848bff27b01a70f8
# Parent  dd1998dd6f3b6f396a0445c41ff8c4062d2f7419

hgweb: return iterable, add deprecation note

diff --git a/mercurial/hgweb/request.py b/mercurial/hgweb/request.py
--- a/mercurial/hgweb/request.py
+++ b/mercurial/hgweb/request.py
@@ -84,7 +84,9 @@ class wsgirequest(object):
         self.header(headers)
 
 def wsgiapplication(app_maker):
+    '''For compatibility with old CGI scripts. A plain hgweb() or hgwebdir()
+    can and should now be used as a WSGI application.'''
     application = app_maker()
     def run_wsgi(env, respond):
-        application(env, respond)
+        return application(env, respond)
     return run_wsgi