Author: remy.maucherat(a)jboss.com
Date: 2009-02-09 14:55:56 -0500 (Mon, 09 Feb 2009)
New Revision: 926
Modified:
branches/2.1.x/java/org/apache/catalina/startup/ContextConfig.java
branches/2.1.x/java/org/apache/catalina/startup/HostConfig.java
branches/2.1.x/webapps/docs/changelog.xml
Log:
- Two fixes for appBase matching in standalone.
Modified: branches/2.1.x/java/org/apache/catalina/startup/ContextConfig.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/startup/ContextConfig.java 2009-02-09 19:55:07
UTC (rev 925)
+++ branches/2.1.x/java/org/apache/catalina/startup/ContextConfig.java 2009-02-09 19:55:56
UTC (rev 926)
@@ -906,7 +906,7 @@
}
}
- if (docBase.startsWith(canonicalAppBase.getPath())) {
+ if (docBase.startsWith(canonicalAppBase.getPath() + File.separatorChar)) {
docBase = docBase.substring(canonicalAppBase.getPath().length());
docBase = docBase.replace(File.separatorChar, '/');
if (docBase.startsWith("/")) {
Modified: branches/2.1.x/java/org/apache/catalina/startup/HostConfig.java
===================================================================
--- branches/2.1.x/java/org/apache/catalina/startup/HostConfig.java 2009-02-09 19:55:07
UTC (rev 925)
+++ branches/2.1.x/java/org/apache/catalina/startup/HostConfig.java 2009-02-09 19:55:56
UTC (rev 926)
@@ -1079,7 +1079,7 @@
try {
File current = new File(resources[j]);
current = current.getCanonicalFile();
- if
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath()))
+ if
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath() + File.separator))
||
(current.getAbsolutePath().startsWith(configBase().getAbsolutePath()))) {
if (log.isDebugEnabled())
log.debug("Delete " + current);
@@ -1120,7 +1120,7 @@
try {
File current = new File(resources[j]);
current = current.getCanonicalFile();
- if
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath()))
+ if
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath() + File.separator))
||
(current.getAbsolutePath().startsWith(configBase().getAbsolutePath()))) {
if (log.isDebugEnabled())
log.debug("Delete " + current);
@@ -1138,7 +1138,7 @@
try {
File current = new File(resources2[j]);
current = current.getCanonicalFile();
- if
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath()))
+ if
((current.getAbsolutePath().startsWith(appBase().getAbsolutePath() + File.separator))
||
((current.getAbsolutePath().startsWith(configBase().getAbsolutePath())
&&
(current.getAbsolutePath().endsWith(".xml"))))) {
if (log.isDebugEnabled())
Modified: branches/2.1.x/webapps/docs/changelog.xml
===================================================================
--- branches/2.1.x/webapps/docs/changelog.xml 2009-02-09 19:55:07 UTC (rev 925)
+++ branches/2.1.x/webapps/docs/changelog.xml 2009-02-09 19:55:56 UTC (rev 926)
@@ -30,6 +30,12 @@
<fix>
<bug>46606</bug>: Max depth limit configurable in WebDAV Servlet.
(markt)
</fix>
+ <fix>
+ <bug>38570</bug>: Fix checking of appBase against docBase. (markt)
+ </fix>
+ <fix>
+ <bug>39013</bug>: Fix appBase test when deleting resources. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
Show replies by date