EWS: enable preemptive authentication on non NTLM endpoints

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1854 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-11-09 22:28:23 +00:00
parent e7fdf4dcba
commit b163176284
1 changed files with 6 additions and 0 deletions

View File

@ -34,6 +34,7 @@ import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.ByteArrayRequestEntity;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.commons.httpclient.params.HttpClientParams;
import javax.mail.MessagingException;
import javax.mail.Session;
@ -235,6 +236,11 @@ public class EwsExchangeSession extends ExchangeSession {
}
}
// enable preemptive authentication on non NTLM endpoints
if (!DavGatewayHttpClientFacade.hasNTLM(httpClient)) {
httpClient.getParams().setParameter(HttpClientParams.PREEMPTIVE_AUTHENTICATION, true);
}
try {
folderIdMap = new HashMap<String, String>();
// load actual well known folder ids