mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 03:32:22 -05:00
Detect redirect form instead of logon form, follow redirect to logon form
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@789 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
316ab31b76
commit
83cb84e579
@ -285,6 +285,8 @@ public class ExchangeSession {
|
||||
if (path.startsWith("/")) {
|
||||
// path is absolute, replace method path
|
||||
uri.setPath(path);
|
||||
} else if (path.startsWith("http://") || path.startsWith("https://")){
|
||||
return path;
|
||||
} else {
|
||||
// relative path, build new path
|
||||
String currentPath = method.getPath();
|
||||
@ -363,6 +365,10 @@ public class ExchangeSession {
|
||||
userNameInput = "txtUserName";
|
||||
} else if ("txtUserPass".equals(name)) {
|
||||
passwordInput = "txtUserPass";
|
||||
} else if ("addr".equals(name)) {
|
||||
// this is not a logon form but a redirect form
|
||||
HttpMethod newInitMethod = DavGatewayHttpClientFacade.executeFollowRedirects(httpClient, logonMethod);
|
||||
logonMethod = buildLogonMethod(httpClient, newInitMethod);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -757,7 +763,7 @@ public class ExchangeSession {
|
||||
" ,\"http://schemas.microsoft.com/mapi/proptag/x0E070003\", \"http://schemas.microsoft.com/mapi/proptag/x10810003\"" +
|
||||
" ,\"urn:schemas:mailheader:message-id\", \"urn:schemas:httpmail:read\" " +
|
||||
" ,\"http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/0x8570\" as deleted, \"urn:schemas:mailheader:date\"", conditions);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Search folder for messages matching conditions, with given attributes.
|
||||
@ -1750,7 +1756,7 @@ public class ExchangeSession {
|
||||
for (File file : oldestFiles) {
|
||||
if (!file.delete()) {
|
||||
LOGGER.warn("Unable to delete " + file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
LOGGER.warn("Error deleting ics dump: " + ex.getMessage());
|
||||
|
Loading…
Reference in New Issue
Block a user