Hi!

I've found that Allan Saddi <[EMAIL PROTECTED]>, author of the
_fcgi.py module, has patched it a little and thus fixed a
problem when web-server nginx (http://www.sysoev.ru/en/)
doesn't return complete HTML page from upstream Trac running
as FastCGI.

Current revision of fcgi.py is here:
http://www.saddi.com/software/py-lib/py-lib/fcgi.py

Patch that helps me is applied.
--- _fcgi.py    2006-02-17 18:48:24 +0300
+++ fcgi.py     2006-02-26 18:58:47 +0300
@@ -57,6 +68,10 @@
     import dummy_threading as threading
     thread_available = False
 
+# Apparently 2.3 doesn't define SHUT_WR? Assume it is 1 in this case.
+if not hasattr(socket, 'SHUT_WR'):
+    socket.SHUT_WR = 1
+
 __all__ = ['WSGIServer']
 
 # Constants from the spec.
@@ -740,7 +753,7 @@
                 outrec.contentData += encode_pair(name, str(cap))
 
         outrec.contentLength = len(outrec.contentData)
-        self.writeRecord(rec)
+        self.writeRecord(outrec)
 
     def _do_begin_request(self, inrec):
         """Handle an FCGI_BEGIN_REQUEST from the web server."""

Attachment: pgpYO2hjWWrt2.pgp
Description: PGP signature

_______________________________________________
Trac mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac

Reply via email to