mirror of
https://github.com/owncloud/android-library.git
synced 2025-06-07 16:06:08 +00:00
Fixed existence check on files when automatic redirections are explicitly disabled (SAML SSO)
This commit is contained in:
parent
f5fbca24be
commit
02c24c8a3b
@ -83,9 +83,11 @@ public class ExistenceCheckRemoteOperation extends RemoteOperation {
|
||||
try {
|
||||
head = new HeadMethod(client.getWebdavUri() + WebdavUtils.encodePath(mPath));
|
||||
client.setFollowRedirects(false);
|
||||
client.executeMethod(head, TIMEOUT, TIMEOUT);
|
||||
int status = client.executeMethod(head, TIMEOUT, TIMEOUT);
|
||||
if (previousFollowRedirects) {
|
||||
mRedirectionPath = client.followRedirection(head);
|
||||
int status = mRedirectionPath.getLastStatus();
|
||||
status = mRedirectionPath.getLastStatus();
|
||||
}
|
||||
client.exhaustResponse(head.getResponseBodyAsStream());
|
||||
boolean success = (status == HttpStatus.SC_OK && !mSuccessIfAbsent) ||
|
||||
(status == HttpStatus.SC_NOT_FOUND && mSuccessIfAbsent);
|
||||
|
Loading…
x
Reference in New Issue
Block a user