Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Patch
Description
When a repository URL is configured with a trailing slash, such as http://repo1.maven.org/maven2/, the URLs that are constructed contain double slashes. The currently assembled URL is something like http://repo1.maven.org/maven2//org/apache/maven/maven-2.0-20050406.034330-1.pom.
As a URL that ends in a directory should end with a slash, per the URI syntax, the use of trailing slashes in configured URLs should be a common occurrence. This generally doesn't affect most web servers, as most operating systems don't allow directories with an empty string name, which is what a "//" would indicate.
I've attached a simple patch that cleans this up for wagon-http and wagon-http-lightweight. The patch includes two new test cases to exercise this code. The knew test cases are just duplicates of existing test cases, but with a fixture repository URL that ends in a slash.