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

2014-04-16 Thread Thomas Fenzl
Changes by Thomas Fenzl thomas.fe...@gmx.net: -- nosy: +Thomas Fenzl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1684 ___ ___ Python-bugs-list

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

2013-11-17 Thread Christian Heimes
Changes by Christian Heimes li...@cheimes.de: -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1684 ___ ___

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

2013-11-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1684 ___ ___ Python-bugs-list mailing

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

2010-08-05 Thread Fazal Majid
Fazal Majid pyt...@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

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

2010-08-03 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: In the absence of the local docs claiming that cgiHTTPServer changes directory, this is a feature request that could only go into 3.2 or later. If I understand http.server.py, the successor does use subprocess, so G.P.Smith's suggestion in

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

2009-05-04 Thread Fazal Majid
Fazal Majid pyt...@sentfrom.com added the comment: The problem is that in the current implementation there is no hook to allow overriding any setup prior to exec, so the only way to produce the standard UNIX behavior assumed by many scripts is to copy-paste the code and patch it manually, which

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

2009-05-03 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: yes the reporter is correct. the suggested chdir happens in the subprocess. however, that only works on posix systems: windows currently uses popen2/3. (see issue1535504 for another issue with that). switching to subprocess and passing in

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

2009-05-03 Thread Gregory P. Smith
Gregory P. Smith g...@krypto.org added the comment: fyi - non-posix / non-windows platforms could include alternate python VMs that don't support fork, popen2 or subprocess. -- assignee: gregory.p.smith - ___ Python tracker rep...@bugs.python.org

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

2008-03-17 Thread Sean Reifschneider
Sean Reifschneider [EMAIL PROTECTED] added the comment: Is the reporter correct that it is not thread impacting? -- assignee: - tiran nosy: +jafo priority: - normal __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1684

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

2008-03-17 Thread Sean Reifschneider
Changes by Sean Reifschneider [EMAIL PROTECTED]: -- keywords: +patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1684 __ ___ Python-bugs-list mailing list

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

2007-12-23 Thread Christian Heimes
Christian Heimes added the comment: A small note from me: Your proposed patch is no good and is going to lead to strange, hard to debug bugs in your app. os.chdir() isn't safe in a threaded environment. You must protect the entire section with a global lock. -- nosy: +tiran

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

2007-12-23 Thread Fazal Majid
Fazal Majid added the comment: MT-safety has nothing to do with this. The os.chdir() is invoked from the new child process that is forked just prior to calling execve() to run the CGI script, after which it exits. The parent CGIHTTPServer may be multithreaded, but invoking the CGI script is not

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

2007-12-21 Thread Fazal Majid
New submission from Fazal Majid: The CGI specification does not specify the working directory the CGI is invoked in, but the usual behavior is to use the directory containing the script. CGIHTTPServer should either change working directory by default (see patch below), or offer a hook to be

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

2007-12-21 Thread Martin v. Löwis
Martin v. Löwis added the comment: Can you give some reference to demonstrate that this is the usual behavior? -- nosy: +loewis __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1684 __

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

2007-12-21 Thread Fazal Majid
Fazal Majid added the comment: There isn't any normative reference that I know of, in fact the default behavior is different on Unix and Windows. Apache 2.2 (and most certainly older versions as well) implements this in mod_cgi.c. The relevant lines: /* Transmute ourselves into the script.