Author: tim
Date: Fri Jan 28 06:50:51 2005
New Revision: 148890

URL: http://svn.apache.org/viewcvs?view=rev&rev=148890
Log:
MountTableMatcher: Do not append a / to an empty prefix.
Modified:
   cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java

Modified: 
cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java
Url: 
http://svn.apache.org/viewcvs/cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java?view=diff&rev=148890&p1=cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java&r1=148889&p2=cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java&r2=148890
==============================================================================
--- cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java     
(original)
+++ cocoon/trunk/src/java/org/apache/cocoon/matching/MountTableMatcher.java     
Fri Jan 28 06:50:51 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"));

Reply via email to