summaryrefslogtreecommitdiff
path: root/paste/errordocument.py
diff options
context:
space:
mode:
authorpjenvey <pjenvey@localhost>2006-07-26 07:28:17 +0000
committerpjenvey <pjenvey@localhost>2006-07-26 07:28:17 +0000
commite4a2e007d8caa685836ab19956447d693e677383 (patch)
treee6996dc6bf5192abd73f11b2db169aebc66f0e72 /paste/errordocument.py
parent5b9b5b862ebc8dddcca5cfc57ef5442f3e936b6b (diff)
downloadpaste-git-e4a2e007d8caa685836ab19956447d693e677383.tar.gz
StatusBasedForward will consume the enclosed app's response when the Forward
condition is met, but wasn't close()ing it when it's iterable
Diffstat (limited to 'paste/errordocument.py')
-rw-r--r--paste/errordocument.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/paste/errordocument.py b/paste/errordocument.py
index b041203..3a7c670 100644
--- a/paste/errordocument.py
+++ b/paste/errordocument.py
@@ -175,6 +175,10 @@ class StatusBasedForward:
app_iter = self.application(environ, change_response)
if url:
+ if hasattr(app_iter, 'close'):
+ list(app_iter)
+ app_iter.close()
+
if self.debug:
environ['wsgi.errors'].write(
'=> paste.errordocuments: -> %r\n'%url[0][0]