Patches item #1535504, was opened at 2006-08-06 21:43 Message generated for change (Comment added) made by htgoebel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1535504&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Library (Lib) Group: None >Status: Open Resolution: None Priority: 5 Private: No Submitted By: Hartmut Goebel (htgoebel) Assigned to: Nobody/Anonymous (nobody) Summary: CGIHTTPServer doesn't handle path names with embeded space Initial Comment: This is a patch for Bug #1436206: On Windows, if the path name of a CGI script to be run contains space characters, it need to be quoted properly when called via os.popen2/3. Otherwise the script can not be executed. Solved by using commands.mkarg() to quote arguments where necessary. ---------------------------------------------------------------------- >Comment By: Hartmut Goebel (htgoebel) Date: 2007-03-14 22:22 Message: Logged In: YES user_id=376953 Originator: YES I think the best way to solve this would be to use the subprocess module, as amk suggested. I included a new patch which for CGIHTTPServer which uses subprocess. Unfortunately this does not work ion Windows due to a problem with subprocess: On Windows passing the request.rfile (a _fileobject wrapper arround the socket) as stdin/out lead to an error. I'll file a bugreport on that case. Beside of this, the patch should solve the problem in a platform-independent way. File Added: CGIHTTPServer.patch ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2007-03-13 20:36 Message: Logged In: YES user_id=849994 Originator: NO Note that commands.mkarg() is written for UNIX shells. While it may work with spaces in the file name, it may produce illegal Windows command line commands in other cases. ---------------------------------------------------------------------- Comment By: A.M. Kuchling (akuchling) Date: 2006-10-27 19:54 Message: Logged In: YES user_id=11375 Would it simplify matters if CGIHTTPServer used the subprocess module, which tries to provide a platform-independent interface? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1535504&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches