Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-114

when repository URL contians a trailing slash, resolved URLs contain duplicate slashes

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Flags:
      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.

        Attachments

          Activity

            People

            • Assignee:
              brettporter Brett Porter
              Reporter:
              nbeyer Nathan Beyer

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment