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
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
___
___
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +neologix
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1684
___
___
Python-bugs-list mailing
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
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
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
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
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
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
Changes by Sean Reifschneider [EMAIL PROTECTED]:
--
keywords: +patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1684
__
___
Python-bugs-list mailing list
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
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
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
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
__
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.
15 matches
Mail list logo