summaryrefslogtreecommitdiff
path: root/wsgitools/scgi
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2007-04-18 10:36:25 +0200
committerHelmut Grohne <helmut@subdivi.de>2007-04-18 10:36:25 +0200
commit1637616a8c7dc16beb6630ccab24799e2974ccbd (patch)
treefc2913bb495aaae83537b9316c105a233cbb98b5 /wsgitools/scgi
parentdb9d4aa502f88fa39de69142517b4ab5f1a0d5ab (diff)
downloadwsgitools-1637616a8c7dc16beb6630ccab24799e2974ccbd.tar.gz
fixed grave data sending bug in wsgitools.scgi
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r--wsgitools/scgi/asynchronous.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py
index 51349a0..9510b4d 100644
--- a/wsgitools/scgi/asynchronous.py
+++ b/wsgitools/scgi/asynchronous.py
@@ -145,10 +145,11 @@ class SCGIConnection(asyncore.dispatcher):
assert self.state >= SCGIConnection.REQ
if len(self.outbuff) < self.BLOCK_SIZE:
for data in self.wsgihandler:
- self.outbuff += data
- if len(self.outbuff) >= self.BLOCK_SIZE:
+ if data:
self._try_send_headers()
- break
+ self.outbuff += data
+ if len(self.outbuff) >= self.BLOCK_SIZE:
+ break
if len(self.outbuff) == 0:
if hasattr(self.wsgihandler, "close"):
self.wsgihandler.close()