mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 11:42:23 -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("/")) {
|
if (path.startsWith("/")) {
|
||||||
// path is absolute, replace method path
|
// path is absolute, replace method path
|
||||||
uri.setPath(path);
|
uri.setPath(path);
|
||||||
|
} else if (path.startsWith("http://") || path.startsWith("https://")){
|
||||||
|
return path;
|
||||||
} else {
|
} else {
|
||||||
// relative path, build new path
|
// relative path, build new path
|
||||||
String currentPath = method.getPath();
|
String currentPath = method.getPath();
|
||||||
@ -363,6 +365,10 @@ public class ExchangeSession {
|
|||||||
userNameInput = "txtUserName";
|
userNameInput = "txtUserName";
|
||||||
} else if ("txtUserPass".equals(name)) {
|
} else if ("txtUserPass".equals(name)) {
|
||||||
passwordInput = "txtUserPass";
|
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 {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user