1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00

Dav: update httpClient host after login

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1729 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2011-07-06 18:59:48 +00:00
parent d0199758ac
commit 6fb31025a5

View File

@ -464,7 +464,7 @@ public class DavExchangeSession extends ExchangeSession {
@Override @Override
protected void buildSessionInfo(HttpMethod method) throws DavMailException { protected void buildSessionInfo(HttpMethod method) throws DavMailException {
checkPublicFolder(); checkPublicFolder(method);
buildMailPath(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(); Cookie[] currentCookies = httpClient.getState().getCookies();
// check public folder access // check public folder access
try { try {
// update client host
httpClient.getHostConfiguration().setHost(method.getURI());
publicFolderUrl = httpClient.getHostConfiguration().getHostURL()+PUBLIC_ROOT; publicFolderUrl = httpClient.getHostConfiguration().getHostURL()+PUBLIC_ROOT;
DavPropertyNameSet davPropertyNameSet = new DavPropertyNameSet(); DavPropertyNameSet davPropertyNameSet = new DavPropertyNameSet();
davPropertyNameSet.add(Field.getPropertyName("displayname")); davPropertyNameSet.add(Field.getPropertyName("displayname"));