summaryrefslogtreecommitdiff
path: root/wsgitools/scgi/forkpool.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2012-11-01 11:33:34 +0100
committerHelmut Grohne <helmut@subdivi.de>2012-11-01 11:33:34 +0100
commitdd8148e11636d6c3792e8ceb03478048ae8eb571 (patch)
tree411913dbaa107d1fcdd5dfbaf7f6e3b4e7a18a99 /wsgitools/scgi/forkpool.py
parent36a72a53a62c3e86ed67852a6767d0ddb0a437b9 (diff)
downloadwsgitools-dd8148e11636d6c3792e8ceb03478048ae8eb571.tar.gz
scgi.forkpool: fixed wrong assertion
The forkpool server was incompatible with dumb generators. They only call start_response when being asked for the first output element, but the forkpool server was wrongly requiring start_response to be called before returning the iterator.
Diffstat (limited to 'wsgitools/scgi/forkpool.py')
-rw-r--r--wsgitools/scgi/forkpool.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wsgitools/scgi/forkpool.py b/wsgitools/scgi/forkpool.py
index 5931deb..52240f2 100644
--- a/wsgitools/scgi/forkpool.py
+++ b/wsgitools/scgi/forkpool.py
@@ -448,9 +448,9 @@ class SCGIServer:
while sent > 0:
sent = result.transfer(con)
else:
- assert response_head[0] is not None
result_iter = iter(result)
for data in result_iter:
+ assert response_head[0] is not None
assert isinstance(data, str)
dumbsend(data)
if response_head[0] != True: