From 27f7fd0e8882e919cb6b2798eb6b8f1feb2d7829 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 11 Sep 2007 21:51:48 +0200 Subject: fix scgi.asynchronous to work with empty responses --- wsgitools/scgi/asynchronous.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wsgitools') diff --git a/wsgitools/scgi/asynchronous.py b/wsgitools/scgi/asynchronous.py index f5a6a43..bdb2a20 100644 --- a/wsgitools/scgi/asynchronous.py +++ b/wsgitools/scgi/asynchronous.py @@ -148,9 +148,9 @@ class SCGIConnection(asyncore.dispatcher): """asyncore interface""" assert self.state >= SCGIConnection.REQ if len(self.outbuff) < self.BLOCK_SIZE: + self._try_send_headers() for data in self.wsgihandler: if data: - self._try_send_headers() self.outbuff += data if len(self.outbuff) >= self.BLOCK_SIZE: break -- cgit v1.2.3