Fixed detection of authentication method in server with permanent redirection

This commit is contained in:
David A. Velasco 2014-03-26 08:34:39 +01:00
parent b6d9c267ea
commit fb9f7797f4

View file

@ -95,9 +95,11 @@ public class DetectAuthenticationMethodOperation extends RemoteOperation {
// try to access the root folder, following redirections but not SAML SSO redirections
result = operation.execute(client);
while (result.isTemporalRedirection() && !result.isIdPRedirection()) {
String redirectedLocation = result.getRedirectedLocation();
while (redirectedLocation != null && redirectedLocation.length() > 0 && !result.isIdPRedirection()) {
client.setWebdavUri(Uri.parse(result.getRedirectedLocation()));
result = operation.execute(client);
redirectedLocation = result.getRedirectedLocation();
}
// analyze response