1
0
mirror of https://github.com/owncloud/android-library.git synced 2025-06-07 16:06:08 +00:00

Reading several authenticate headers from http response

This commit is contained in:
davigonz 2017-06-30 12:35:19 +02:00 committed by David A. Velasco
parent e4b57e8063
commit f6ee1a15cb

View File

@ -129,7 +129,7 @@ public class RemoteOperationResult implements Serializable {
private Exception mException = null;
private ResultCode mCode = ResultCode.UNKNOWN_ERROR;
private String mRedirectedLocation;
private String mAuthenticate;
private ArrayList<String> mAuthenticate = new ArrayList<>();
private String mLastPermanentLocation = null;
private ArrayList<Object> mData;
@ -321,8 +321,7 @@ public class RemoteOperationResult implements Serializable {
continue;
}
if ("www-authenticate".equals(current.getName().toLowerCase())) {
mAuthenticate = current.getValue();
break;
mAuthenticate.add(current.getValue().toLowerCase());
}
}
}
@ -562,7 +561,7 @@ public class RemoteOperationResult implements Serializable {
return (mRedirectedLocation != null && !(mRedirectedLocation.toLowerCase().startsWith("https://")));
}
public String getAuthenticateHeader() {
public ArrayList<String> getAuthenticateHeader() {
return mAuthenticate;
}