maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r745735 - in /maven/wagon/trunk: ./ wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/ wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/
Date Thu, 19 Feb 2009 05:32:23 GMT
Author: brett
Date: Thu Feb 19 05:32:22 2009
New Revision: 745735

URL: http://svn.apache.org/viewvc?rev=745735&view=rev
Log:
[WAGON-223] HTTP Wagon getFileList() returns empty list for connected base URL
Submitted by: Antti Virtanen

Modified:
    maven/wagon/trunk/pom.xml
    maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
    maven/wagon/trunk/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java

Modified: maven/wagon/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/pom.xml?rev=745735&r1=745734&r2=745735&view=diff
==============================================================================
--- maven/wagon/trunk/pom.xml (original)
+++ maven/wagon/trunk/pom.xml Thu Feb 19 05:32:22 2009
@@ -100,6 +100,9 @@
     <contributor>
       <name>Kohsuke Kawaguchi</name>
     </contributor>
+    <contributor>
+      <name>Antti Virtanen</name>
+    </contributor>
   </contributors>
 
   <mailingLists>

Modified: maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java?rev=745735&r1=745734&r2=745735&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
Thu Feb 19 05:32:22 2009
@@ -107,7 +107,7 @@
 
         public Parser( URI baseURI )
         {
-            this.baseURI = baseURI;
+            this.baseURI = baseURI.normalize();
         }
 
         public Set getLinks()

Modified: maven/wagon/trunk/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java?rev=745735&r1=745734&r2=745735&view=diff
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
Thu Feb 19 05:32:22 2009
@@ -266,6 +266,80 @@
     }
 
     /**
+     * Test of an html which is improperly formatted, contains full host-specific paths to
the resources and uses non-normalized base URI
+     * @throws Exception
+     */
+    public void testParseJettyWithNonNormalizedBaseURI()
+        throws Exception
+    {
+        List/*<String>*/links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon//",
+                                             "jetty-wagon.html" );
+
+        String[] expected = new String[] {
+            "wagon-1.0-alpha-2.pom",
+            "wagon-1.0-alpha-2.pom.asc",
+            "wagon-1.0-alpha-2.pom.md5",
+            "wagon-1.0-alpha-2.pom.sha1",
+            "wagon-1.0-alpha-3-20050413.021234-4.pom",
+            "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
+            "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
+            "wagon-1.0-alpha-3-20050419.043745-5.pom",
+            "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
+            "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
+            "wagon-1.0-alpha-3-20050419.044035-6.pom",
+            "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
+            "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
+            "wagon-1.0-alpha-3-20050421.162738-7.pom",
+            "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
+            "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
+            "wagon-1.0-alpha-3-20050422.075233-8.pom",
+            "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
+            "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
+            "wagon-1.0-alpha-3-20050429.051847-9.pom",
+            "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
+            "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
+            "wagon-file/",
+            "wagon-ftp/",
+            "wagon-http-lightweight/",
+            "wagon-http/",
+            "wagon-lightweight-http/",
+            "wagon-provider-api/",
+            "wagon-provider-test/",
+            "wagon-provider/",
+            "wagon-providers-1.0-alpha-2.pom",
+            "wagon-providers-1.0-alpha-2.pom.asc",
+            "wagon-providers-1.0-alpha-2.pom.md5",
+            "wagon-providers-1.0-alpha-2.pom.sha1",
+            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
+            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
+            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
+            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
+            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
+            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
+            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
+            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
+            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
+            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
+            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
+            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
+            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
+            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
+            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
+            "wagon-providers/",
+            "wagon-scm/",
+            "wagon-ssh-external/",
+            "wagon-ssh/",
+            "wagon-webdav/",
+            "wagon/" };
+
+        assertContainsExpected( links, expected );
+
+        String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
+
+        assertNotContainingAvoided( links, avoided );
+    }
+
+    /**
      * Using repository.codehaus.org output as an example.
      * This is an example of an older RHEL installation of apache httpd with old fancy indexing
output
      * This example tests how to detect directories properly.



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message