fixed bug about lazy WSGI middleware, thanks Anthony

This commit is contained in:
mdipierro
2013-08-06 01:59:11 -05:00
parent 1caea9313a
commit 7220c78581
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.08.05.10.37.23
Version 2.6.0-development+timestamp.2013.08.06.01.58.11
+2 -2
View File
@@ -292,7 +292,7 @@ class LazyWSGI(object):
self.response.headers = dict(headers)
return lambda *args, **kargs: \
self.response.write(escape=False, *args, **kargs)
def middleware(self,*a):
def middleware(self,*middleware_apps):
"""
In you controller use::
@@ -311,7 +311,7 @@ class LazyWSGI(object):
return [data]
for item in middleware_apps:
app = item(app)
def caller(app):
def caller(app):
return app(self.environ, self.start_response)
return lambda caller=caller, app=app: caller(app)
return middleware