Bug 49657

Summary: In CGI Mode, "executable" full path with spaces does not work
Product: Tomcat 6 Reporter: de Ratuld <jean.de.ratuld>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 6.0.29   
Target Milestone: default   
Hardware: PC   
OS: Windows Server 2003   

Description de Ratuld 2010-07-28 03:45:08 UTC
In CGI mode, if you specify a full path for a command, containing blank, 
it does not work

example :
       <init-param>
            <param-name>executable</param-name>
            <param-value>c:\Tools\mycommand</param-value>
        </init-param>
is OK but

       <init-param>
            <param-name>executable</param-name>
            <param-value>c:\Program Files\mycommand</param-value>
          </init-param>
does not work well with error like


7 juil. 2010 15:51:52 org.apache.catalina.core.ApplicationContext log
INFO: cgi: runCGI (stderr):'C:\Program' is not recognized as an internal or external command,

Need probably to add " in for cgiExcecutable in CGIServlet.java,  like it is done
for CmdAndArgs
Comment 1 Mark Thomas 2010-09-28 10:47:02 UTC
Fixed in trunk and will be included in 7.0.3 onwards.

It has also been proposed for backport to 6.0.x
Comment 2 Mark Thomas 2010-10-04 17:01:39 UTC
This has been fixed in 6.0.x and will be included in 6.0.30 onwards.