FIX: httclient is not registered for https urls (IVY-171)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ivy/trunk@484209 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Xavier Hanin 2006-02-13 11:31:13 +00:00
parent 0be5b4053f
commit d7d9cf45fa
4 changed files with 10 additions and 2 deletions

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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;