Author: markt Date: Wed Mar 2 10:45:03 2016 New Revision: 1733247 URL: http://svn.apache.org/viewvc?rev=1733247&view=rev Log: Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=59065 Correct the timing of the check for colons in paths on non-Windows systems implemented in catalina.sh so it works correctly with Cygwin. Patch provided by Ed Randall.
Modified: tomcat/trunk/bin/catalina.sh tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/bin/catalina.sh URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=1733247&r1=1733246&r2=1733247&view=diff ============================================================================== --- tomcat/trunk/bin/catalina.sh (original) +++ tomcat/trunk/bin/catalina.sh Wed Mar 2 10:45:03 2016 @@ -123,20 +123,6 @@ PRGDIR=`dirname "$PRG"` # Copy CATALINA_BASE from CATALINA_HOME if not already set [ -z "$CATALINA_BASE" ] && CATALINA_BASE="$CATALINA_HOME" -# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon -# as this is used as the separator in the classpath and Java provides no -# mechanism for escaping if the same character appears in the path. -case $CATALINA_HOME in - *:*) echo "Using CATALINA_HOME: $CATALINA_HOME"; - echo "Unable to start as CATALINA_HOME contains a colon (:) character"; - exit 1; -esac -case $CATALINA_BASE in - *:*) echo "Using CATALINA_BASE: $CATALINA_BASE"; - echo "Unable to start as CATALINA_BASE contains a colon (:) character"; - exit 1; -esac - # Ensure that any user defined CLASSPATH variables are not used on startup, # but allow them to be specified in setenv.sh, in rare case when it is needed. CLASSPATH= @@ -156,6 +142,20 @@ if $cygwin; then [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` fi +# Ensure that neither CATALINA_HOME nor CATALINA_BASE contains a colon +# as this is used as the separator in the classpath and Java provides no +# mechanism for escaping if the same character appears in the path. +case $CATALINA_HOME in + *:*) echo "Using CATALINA_HOME: $CATALINA_HOME"; + echo "Unable to start as CATALINA_HOME contains a colon (:) character"; + exit 1; +esac +case $CATALINA_BASE in + *:*) echo "Using CATALINA_BASE: $CATALINA_BASE"; + echo "Unable to start as CATALINA_BASE contains a colon (:) character"; + exit 1; +esac + # For OS400 if $os400; then # Set job priority to standard for interactive (interactive - 6) by using Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1733247&r1=1733246&r2=1733247&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Mar 2 10:45:03 2016 @@ -140,6 +140,11 @@ <fix> Fix incorrect parsing of the NE and NC flags in rewrite rules. (remm) </fix> + <fix> + <bug>59065</bug>: Correct the timing of the check for colons in paths + on non-Windows systems implemented in <code>catalina.sh</code> so it + works correctly with Cygwin. Patch provided by Ed Randall. (markt) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org