From 53ddf0ef4962270bf809d8a279e8a7bd2c806f94 Mon Sep 17 00:00:00 2001 From: mguessan Date: Thu, 15 Oct 2009 21:05:32 +0000 Subject: [PATCH] Some Exchange servers redirect to a different host for freebusy, use wide auth scope git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@781 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/http/DavGatewayHttpClientFacade.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/java/davmail/http/DavGatewayHttpClientFacade.java b/src/java/davmail/http/DavGatewayHttpClientFacade.java index a185c883..d03c84f9 100644 --- a/src/java/davmail/http/DavGatewayHttpClientFacade.java +++ b/src/java/davmail/http/DavGatewayHttpClientFacade.java @@ -97,7 +97,8 @@ public final class DavGatewayHttpClientFacade { try { URI httpURI = new URI(url, true); hostConfig.setHost(httpURI); - AuthScope authScope = new AuthScope(httpURI.getHost(), httpURI.getPort(), AuthScope.ANY_REALM); + // some Exchange servers redirect to a different host for freebusy, use wide auth scope + AuthScope authScope = new AuthScope(null, -1); httpClient.getState().setCredentials(authScope, new UsernamePasswordCredentials(userName, password)); } catch (URIException e) { throw new DavMailException("LOG_INVALID_URL", url);