Fix regression on basic authentication after refactoring

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@459 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-03-19 09:32:00 +00:00
parent a38055b5ea
commit 554305e52b
1 changed files with 6 additions and 1 deletions

View File

@ -40,10 +40,15 @@ public final class DavGatewayHttpClientFacade {
return httpClient;
}
public static HttpClient getInstance(HttpURL httpURL) {
public static HttpClient getInstance(HttpURL httpURL) throws URIException {
HttpClient httpClient = new HttpClient();
HostConfiguration hostConfig = httpClient.getHostConfiguration();
hostConfig.setHost(httpURL);
UsernamePasswordCredentials hostCredentials =
new UsernamePasswordCredentials(httpURL.getUser(),
httpURL.getPassword());
httpClient.getState().setCredentials(null, httpURL.getHost(),
hostCredentials);
configureClient(httpClient);
return httpClient;
}