Author: tim Date: Fri Jan 28 06:59:01 2005 New Revision: 148892 URL: http://svn.apache.org/viewcvs?view=rev&rev=148892 Log: MountTableMatcher: Do not append a / to an empty prefix. Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java
Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java?view=diff&rev=148892&p1=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java&r1=148891&p2=cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java&r2=148892 ============================================================================== --- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java (original) +++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/matching/MountTableMatcher.java Fri Jan 28 06:59:01 2005 @@ -140,10 +140,10 @@ Configuration child = children[i]; if ("mount".equals(child.getName())) { String prefix = children[i].getAttribute("uri-prefix"); - // Append a '/' at the end of the prefix + // Append a '/' at the end of a not-empty prefix // this avoids flat uri matching which would cause // exceptions in the sub sitemap! - if (!prefix.endsWith("/")) { + if (!prefix.endsWith("/") && prefix.length() != 0) { prefix = prefix + '/'; } mounts.put(prefix, children[i].getAttribute("src"));