Author: markt
Date: Fri Oct 27 17:42:49 2006
New Revision: 468601

URL: http://svn.apache.org/viewvc?view=rev&rev=468601
Log: (empty)

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java?view=diff&rev=468601&r1=468600&r2=468601
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
 Fri Oct 27 17:42:49 2006
@@ -946,10 +946,8 @@
                 }
                 path = currentLocation.getAbsolutePath();
                 name = currentLocation.getName();
-                cginame =
-                currentLocation.getParent().substring(webAppRootDir.length())
-                + File.separator
-                + name;
+                cginame = (currentLocation.getParent() + File.separator).
+                        substring(webAppRootDir.length()) + name;
 
                 if (".".equals(contextPath)) {
                     scriptname = servletPath + cginame;
@@ -1147,6 +1145,8 @@
             command = fCGIFullPath.getCanonicalPath();
 
             envp.put("X_TOMCAT_SCRIPT_PATH", command);  //for kicks
+
+            envp.put("SCRIPT_FILENAME", command); // for PHP
 
             this.env = envp;
 

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?view=diff&rev=468601&r1=468600&r2=468601
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Fri Oct 27 17:42:49 2006
@@ -68,6 +68,15 @@
         <bug>40802</bug>: Add jsp-api.jar to fileset in catalina-tasks.xml as 
provided by
         Daniel Santos. (pero)
       </fix>
+      <fix>
+        <bug>40817</bug>: Correct problem where scripts in the root of the
+        ROOT context threw a <code>StringIndexOutOfBoundsException</code>.
+        (markt)
+      </fix>
+      <update>
+        Set the <code>SCRIPT_FILENAME</code> environment variable required
+        by PHP when using the CGIServlet to execute PHP.
+      </update>
     </changelog>
   </subsection> 
   <subsection name="Coyote">



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to