Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-1106

URLResource does not properly support authentication

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

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0-RC2
    • 2.2.0-RC1
    • Core
    • None

    Description

      org.apache.ivy.plugins.repository.url.UrlResource#openStream uses java.net.URL#openStream rather than going through the URLHandlerRegistry like init does. This breaks authentication support. I encountered this bug when using a version range specification (1.+) against a secured Maven repository, but I imagine that it can cause any number of other problems. The fix is simply to change openStream to work the same way init does, by replacing

      return url.openStream();

      with

      return URLHandlerRegistry.getDefault().openStream(url);

      This change passes all tests and solves my problem.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            maartenc Maarten Coene
            heschi Heschi Kreinick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment