mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-12 14:08:38 -05:00
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:
parent
a38055b5ea
commit
554305e52b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user