[issue1684] CGIHTTPServer does not chdir prior to executing the CGI script

Fazal Majid report at bugs.python.org
Thu Aug 5 21:56:43 CEST 2010


Fazal Majid <python at sentfrom.com> added the comment:

Well, CGI/1.1 was formally documented by RFC 3875 in October 2004 (a full 11 years after CGI was introduced...).
http://www.rfc-editor.org/rfc/rfc3875.txt

The RFC is classified as "informative", but it's as close to a definitive spec for CGI as we will ever get. Section 7 described the system-specific implementation notes, and 7.2 specifies UNIX in particular:

The current working directory
      The current working directory for the script SHOULD be set to the
      directory containing the script.

This is also the specified behavior for AmugaDOS and EBCDIC POSIX systems. Oddly enough, the RFC editor did not find it worthwhile to specify the behavior on Windows...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1684>
_______________________________________


More information about the Python-bugs-list mailing list