OC-1028: add extra condition to check of redirection. New method isIdPRedirection at RemoteOperationResult

This commit is contained in:
masensio 2013-08-21 18:12:28 +02:00
parent b458c92be0
commit 9724afda5d
2 changed files with 6 additions and 2 deletions

View file

@ -744,7 +744,7 @@ implements OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
// NOTHING TO DO ; can't find out what situation that leads to the exception in this code, but user logs signal that it happens
}
if (result.isTemporalRedirection()) {
if (result.isTemporalRedirection() || result.isIdPRedirection()) {
String url = result.getRedirectedLocation();
String targetUrl = mHostBaseUrl + AccountUtils.getWebdavPath(mDiscoveredVersion, mCurrentAuthTokenType);

View file

@ -24,7 +24,6 @@ import java.net.MalformedURLException;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import java.util.Map;
import javax.net.ssl.SSLException;
@ -319,5 +318,10 @@ public class RemoteOperationResult implements Serializable {
public String getRedirectedLocation() {
return mRedirectedLocation;
}
public boolean isIdPRedirection() {
return (mRedirectedLocation.toUpperCase().contains("SAML") ||
mRedirectedLocation.toLowerCase().contains("wayf"));
}
}