diff --git a/CHANGES.txt b/CHANGES.txt index 32cbb221..891193de 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,7 @@ - IMPROVE: add possibility to choose matcher on include exclude and conflict manager rules in ivy files, and on resolver per module in ivyconf (IVY-161) - IMPROVE: add regexp management in the install ant task (IVY-154) +- FIX: httclient is not registered for https urls (IVY-171) - FIX: post resolve tasks like retrieve or cachepath should be able to run from cache information (IVY-169) - FIX: resolve fails without appropriate message when cache is empty and a module in the repository has no revision (IVY-165) - FIX: resolve problem with configuration inheritance (IVY-164) diff --git a/src/java/fr/jayasoft/ivy/Main.java b/src/java/fr/jayasoft/ivy/Main.java index e3bb356c..9d068516 100644 --- a/src/java/fr/jayasoft/ivy/Main.java +++ b/src/java/fr/jayasoft/ivy/Main.java @@ -26,6 +26,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.types.Path; import fr.jayasoft.ivy.report.ResolveReport; +import fr.jayasoft.ivy.url.URLHandler; import fr.jayasoft.ivy.url.URLHandlerDispatcher; import fr.jayasoft.ivy.url.URLHandlerRegistry; import fr.jayasoft.ivy.util.DefaultMessageImpl; @@ -318,7 +319,9 @@ public class Main { } private static void configureURLHandler(String realm, String host, String username, String passwd) { URLHandlerDispatcher dispatcher = new URLHandlerDispatcher(); - dispatcher.setDownloader("http", URLHandlerRegistry.getHttp(realm, host, username, passwd)); + URLHandler httpHandler = URLHandlerRegistry.getHttp(realm, host, username, passwd); + dispatcher.setDownloader("http", httpHandler); + dispatcher.setDownloader("https", httpHandler); URLHandlerRegistry.setDefault(dispatcher); } diff --git a/src/java/fr/jayasoft/ivy/ant/IvyConfigure.java b/src/java/fr/jayasoft/ivy/ant/IvyConfigure.java index 8c6944f2..4dc00621 100644 --- a/src/java/fr/jayasoft/ivy/ant/IvyConfigure.java +++ b/src/java/fr/jayasoft/ivy/ant/IvyConfigure.java @@ -17,6 +17,7 @@ import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Property; import fr.jayasoft.ivy.Ivy; +import fr.jayasoft.ivy.url.URLHandler; import fr.jayasoft.ivy.url.URLHandlerDispatcher; import fr.jayasoft.ivy.url.URLHandlerRegistry; import fr.jayasoft.ivy.util.Message; @@ -139,7 +140,9 @@ public class IvyConfigure extends IvyTask { } private void configureURLHandler() { URLHandlerDispatcher dispatcher = new URLHandlerDispatcher(); - dispatcher.setDownloader("http", URLHandlerRegistry.getHttp(getRealm(), getHost(), getUsername(), getPasswd())); + URLHandler httpHandler = URLHandlerRegistry.getHttp(getRealm(), getHost(), getUsername(), getPasswd()); + dispatcher.setDownloader("http", httpHandler); + dispatcher.setDownloader("https", httpHandler); URLHandlerRegistry.setDefault(dispatcher); } } diff --git a/src/java/fr/jayasoft/ivy/url/HttpClientHandler.java b/src/java/fr/jayasoft/ivy/url/HttpClientHandler.java index c466a877..ecbf6a9a 100644 --- a/src/java/fr/jayasoft/ivy/url/HttpClientHandler.java +++ b/src/java/fr/jayasoft/ivy/url/HttpClientHandler.java @@ -21,6 +21,7 @@ import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpMethodBase; import org.apache.commons.httpclient.HttpStatus; import org.apache.commons.httpclient.UsernamePasswordCredentials; +import org.apache.commons.httpclient.cookie.CookiePolicy; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.HeadMethod;