Commits

Ian Bicking committed e6b9609

Comments (0)

Files changed (1)

 Application that runs a CGI script.
 """
 import os
+import sys
 import subprocess
 import urllib
 try:
             cwd=os.path.dirname(self.script),
             )
         writer = CGIWriter(environ, start_response)
-        if select:
+        if select and sys.platform != 'win32':
             proc_communicate(
                 proc,
                 stdin=StdinReader.from_environ(environ),
             stdout, stderr = proc.communicate(StdinReader.from_environ(environ).read())
             if stderr:
                 environ['wsgi.errors'].write(stderr)
-            writer(stdout)
+            writer.write(stdout)
         if not writer.headers_finished:
             start_response(writer.status, writer.headers)
         return []