DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40817>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40817 ------- Additional Comments From [EMAIL PROTECTED] 2006-10-26 14:08 ------- Well, I double-check the init-param but it doesn't have a '/' It's "blank" <param-name>cgiPathPrefix</param-name> <param-value></param-value> (also though it's a different issue, I found that "SCRIPT_NAME" was wrong too...it was returning "/test.pltest.pl" or "/test/test.pltest/test.pl"...fixed it in the if statement a few lines down...scriptname = cginame and scriptname = contextpath + cginame, respectively but that's another issue). wait....I see....line 918 adds an extra '/' if the pathprefix setting is null. anyways, "cginame = (currentLocation.getParent() + File.separator).substring(webAppRootDir.length()) + name;" seems to work. btw, how do I submit a feature request? (I added it myself as I was having problems with PHP CGI....I made it so under certain circumstances, it will use "php" instead of "perl" as the cgiexecutable and lo-and-behold, it works...though I also had to add the env "SCRIPT_FILENAME" [which is just a exact copy of "X_TOMCAT_SCRIPT_PATH"] ). I plan to make the php "enhancement" as a part of the init-param so it can be turned on or off as need be (as well as be able to define what constitutes "PHP" mode...as right now, it's hard-coded to look for commands that end with ".php" ".php3" ".php4" ".phps") anyways..maybe a regex for removing the trailing '/' might do... (In reply to comment #2) > This is likely a configuration issue. Make sure that you aren't defining the > CGIServlet init-param cgiPathPrefix as '/' in your CGI servlet definition. > Remove the cgiPathPrefix init-param and it should work as expected. Setting > cgiPathPrefix to '/' was the only way that I could repro this issue. By > having > that set you are unneccessarily adding an extra '/' to the path: > > INFO http-8080-Processor25 > org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/cgi-test] - > cgi: > findCGI: path=/test.pl, /home/chris/apache-tomcat-5.5.20/webapps/cgi-test// > > The CGIServlet is already set up to trim any trailing file seperator from the > webAppRootDir, but it only trims one: > > if ((webAppRootDir != null) > && (webAppRootDir.lastIndexOf(File.separator) == > (webAppRootDir.length() - 1))) { > //strip the trailing "/" from the webAppRootDir > webAppRootDir = > webAppRootDir.substring(0, (webAppRootDir.length() - 1)); > } > > A possibly more appropriate patch would trim an arbitrary number of file > seperators from webAppRootDir, though right now I can't think of another case > where that would be needed. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]