]> source.dussan.org Git - archiva.git/commitdiff
[MRM-694]
authorMaria Odea B. Ching <oching@apache.org>
Wed, 21 May 2008 01:54:13 +0000 (01:54 +0000)
committerMaria Odea B. Ching <oching@apache.org>
Wed, 21 May 2008 01:54:13 +0000 (01:54 +0000)
-handle problem with the missing '/' in the repository group url

git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@658528 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/maven/archiva/webdav/ArchivaDavResourceFactory.java

index 4ee011dc62e9e8d881090a032f7f9c9957160d3c..7e8c12958af447653c362ce1bc408a01bbada36e 100644 (file)
@@ -703,7 +703,13 @@ public class ArchivaDavResourceFactory
                 
         ArchivaVirtualDavResource resource =
             new ArchivaVirtualDavResource( mergedRepositoryContents, logicalResource.getPath(), mimeTypes, locator, this );
-                
+       
+        // compatibility with MRM-440 to ensure browsing the repository group works ok
+        if ( resource.isCollection() && !resource.getLocator().getResourcePath().endsWith( "/" ) )
+        {
+            throw new BrowserRedirectException( resource.getHref() );
+        }
+        
         return resource;
     }