From 6fb31025a506d1d825066d37eb842848061420f3 Mon Sep 17 00:00:00 2001 From: mguessan Date: Wed, 6 Jul 2011 18:59:48 +0000 Subject: [PATCH] Dav: update httpClient host after login git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1729 3d1905a2-6b24-0410-a738-b14d5a86fcbd --- src/java/davmail/exchange/dav/DavExchangeSession.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/java/davmail/exchange/dav/DavExchangeSession.java b/src/java/davmail/exchange/dav/DavExchangeSession.java index af36fdb0..a6ee3e74 100644 --- a/src/java/davmail/exchange/dav/DavExchangeSession.java +++ b/src/java/davmail/exchange/dav/DavExchangeSession.java @@ -464,7 +464,7 @@ public class DavExchangeSession extends ExchangeSession { @Override protected void buildSessionInfo(HttpMethod method) throws DavMailException { - checkPublicFolder(); + checkPublicFolder(method); buildMailPath(method); @@ -695,11 +695,14 @@ public class DavExchangeSession extends ExchangeSession { } } - protected void checkPublicFolder() { + protected void checkPublicFolder(HttpMethod method) { Cookie[] currentCookies = httpClient.getState().getCookies(); // check public folder access try { + // update client host + httpClient.getHostConfiguration().setHost(method.getURI()); + publicFolderUrl = httpClient.getHostConfiguration().getHostURL()+PUBLIC_ROOT; DavPropertyNameSet davPropertyNameSet = new DavPropertyNameSet(); davPropertyNameSet.add(Field.getPropertyName("displayname"));