mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-13 11:12:22 -05:00
Workaround for invalid redirect location
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1542 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
f4ad37ee6f
commit
6277125a83
@ -148,10 +148,14 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
// check EWS access
|
||||
try {
|
||||
checkEndPointUrl("/ews/exchange.asmx");
|
||||
// workaround for Exchange bug: send fake request
|
||||
internalGetFolder("");
|
||||
} catch (IOException e) {
|
||||
try {
|
||||
// failover, try to retrieve EWS url from autodiscover
|
||||
checkEndPointUrl(getEwsUrlFromAutoDiscover());
|
||||
// workaround for Exchange bug: send fake request
|
||||
internalGetFolder("");
|
||||
} catch (IOException e2) {
|
||||
// autodiscover failed and initial exception was authentication failure => throw original exception
|
||||
if (e instanceof DavMailAuthenticationException) {
|
||||
@ -164,8 +168,6 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
|
||||
try {
|
||||
folderIdMap = new HashMap<String, String>();
|
||||
// workaround for Exchange bug: send fake request
|
||||
internalGetFolder("");
|
||||
// load actual well known folder ids
|
||||
folderIdMap.put(internalGetFolder(INBOX).folderId.value, INBOX);
|
||||
folderIdMap.put(internalGetFolder(CALENDAR).folderId.value, CALENDAR);
|
||||
|
@ -303,6 +303,10 @@ public final class DavGatewayHttpClientFacade {
|
||||
if (locationValue.indexOf('"') >= 0) {
|
||||
locationValue = URIUtil.encodePath(locationValue);
|
||||
}
|
||||
// workaround for invalid relative location
|
||||
if (locationValue.startsWith("./")) {
|
||||
locationValue = locationValue.substring(1);
|
||||
}
|
||||
currentMethod.releaseConnection();
|
||||
currentMethod = new GetMethod(locationValue);
|
||||
currentMethod.setFollowRedirects(false);
|
||||
|
Loading…
Reference in New Issue
Block a user