diff options
author | Helmut Grohne <helmut@subdivi.de> | 2007-04-18 10:36:25 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2007-04-18 10:36:25 +0200 |
commit | 1637616a8c7dc16beb6630ccab24799e2974ccbd (patch) | |
tree | fc2913bb495aaae83537b9316c105a233cbb98b5 /wsgitools/scgi | |
parent | db9d4aa502f88fa39de69142517b4ab5f1a0d5ab (diff) | |
download | wsgitools-1637616a8c7dc16beb6630ccab24799e2974ccbd.tar.gz |
fixed grave data sending bug in wsgitools.scgi
Diffstat (limited to 'wsgitools/scgi')
-rw-r--r-- | wsgitools/scgi/asynchronous.py | 7 |
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() |