1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-02-28 17:31:52 -05:00
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1409 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-09-01 20:15:55 +00:00
parent f19b40118c
commit 56d0e7adfe

View File

@ -66,11 +66,12 @@ public final class DavGatewayHttpClientFacade {
private static IdleConnectionTimeoutThread httpConnectionManagerThread;
static {
DavGatewayHttpClientFacade.start();
}
// workaround for TLS Renegotiation issue see http://java.sun.com/javase/javaseforbusiness/docs/TLSReadme.html
System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
// register custom cookie policy
static {
DavGatewayHttpClientFacade.start();
// register custom cookie policy
CookiePolicy.registerCookieSpec("DavMailCookieSpec", DavMailCookieSpec.class);
}
@ -321,8 +322,6 @@ public final class DavGatewayHttpClientFacade {
addNTLM(httpClient);
status = httpClient.executeMethod(method);
}
} catch (IOException e) {
throw e;
} finally {
method.releaseConnection();
}
@ -486,11 +485,11 @@ public final class DavGatewayHttpClientFacade {
NTCredentials credentials = (NTCredentials) httpClient.getState().getCredentials(authScope);
String userName = credentials.getUserName();
int backSlashIndex = userName.indexOf('\\');
if (backSlashIndex >=0) {
if (backSlashIndex >= 0) {
String domain = userName.substring(0, backSlashIndex);
userName = userName.substring(backSlashIndex+1);
userName = userName.substring(backSlashIndex + 1);
credentials = new NTCredentials(userName, credentials.getPassword(), "", domain);
httpClient.getState().setCredentials(authScope, credentials);
httpClient.getState().setCredentials(authScope, credentials);
}
// make sure NTLM is always active