[New-bugs-announce] [issue1235] CGIHTTPRequestHandler.run_cgi() does not run on Windows if sys.executable contains blanks

Andy Schumann report at bugs.python.org
Thu Oct 4 12:13:02 CEST 2007


New submission from Andy Schumann:

On Windows a path can contain spaces (e.g. C:\Program Files\python22
\python.exe). If using popenx each component in a command line has 
therefore to be double quoted as well as the whole command string.
The method run_cgi() of the class CGIHTTPRequestHandler in the module 
CGIHTTPServer does not do this.

Therefore the line 236:
cmdline = "%s -u %s" % (interp, cmdline)
should be replaced by
cmdline = '""%s" -u "%s""' % (interp, cmdline)

----------
components: Windows
messages: 56229
nosy: schu
severity: normal
status: open
title: CGIHTTPRequestHandler.run_cgi() does not run on Windows if sys.executable contains blanks
versions: Python 2.3

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1235>
__________________________________


More information about the New-bugs-announce mailing list