"Dan Perl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Thanks, Pierre, this got me much further but I hit another stumbling > block. I can see now that CGIHTTPServer writes all the header lines into > os.environ and creates a subprocess for the script with os.popen2 or > os.popen3 (it's Windows), passing the form data to the new process through > sys.stdin (I believe it is sys.stdin although the Library Reference > descriptions of popen2 and popen3 say that would be sys.stdout). But I > don't see any of those headers updated in the os.environ of the cgi > script's process. Is the parent's os.environ passed to the subprocesses > created with popen2/popen3 on Windows? > > cgi.FieldStorage.read_urlencoded needs the content-length that should be > passed through os.environ.
I was about to report a bug but then I found bug report "[ 1100235 ] Scripts started with CGIHTTPServer: missing cgi environment" which is actually caused by "[ 1110478 ] os.environ.update doesn't work". They are fixed with a patch in 1110478. I still have to try it. I do like the alternate solution proposed by the originator of 1100235 though. I also thought that CGIHTTPServer should use the new subprocess.Popen class instead of popen2, popen3 and popen4. -- http://mail.python.org/mailman/listinfo/python-list