losing CGI variables in os.environ in Python 2.4

jtauber jtauber at jtauber.com
Sat Jan 8 15:04:29 EST 2005


Did something change between 2.3 and 2.4 that would affect os.environ
being populated with CGI variables when using the
BaseHTTPServer/CGIHTTPServer?

I received a bug report from someone trying to run my wiki/blog
software, Leonardo[1] under Python 2.4 on Windows 2000. I was able to
reproduce the problem under Python 2.4 on Windows XP Pro but confirmed
that it worked fine under Python 2.3.

Simply printing out os.environ at the point things like PATH_INFO are
extracted by Leonardo revealed that os.environ contained no CGI-related
variables when run under Python 2.4 but did contain them under 2.3

I can't see in the code for the http server modules that anything
changed in this area. Am I missing something?

Thanks in advance.
James Tauber
http://jtauber.com/blog/

[1] http://jtauber.com/leonardo




More information about the Python-list mailing list