Merge pull request #448 from owncloud/fix_detection_of_authentication_method_in_server_with_permanent_redirection

Fixed detection of authentication method in server with permanent redire...
This commit is contained in:
masensio 2014-03-26 08:43:50 +01:00
commit 70677a46fd

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