Ivy
  1. Ivy
  2. IVY-1106

URLResource does not properly support authentication

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0-RC2
    • Fix Version/s: 2.2.0-RC1
    • Component/s: Core
    • Labels:
      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.

        Activity

          People

          • Assignee:
            Maarten Coene
            Reporter:
            Heschi Kreinick
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development