Fixed double upload of files with OAuth + Bearer authorization

This commit is contained in:
David A. Velasco 2012-12-19 18:42:38 +01:00
parent 11b88e0fcc
commit 66442da081

View file

@ -330,8 +330,9 @@ public class WebdavClient extends HttpClient {
@Override
public int executeMethod(HostConfiguration hostconfig, final HttpMethod method, final HttpState state) throws IOException, HttpException {
if (mCredentials instanceof BearerAuthScheme) {
if (mCredentials instanceof BearerCredentials) {
method.getHostAuthState().setAuthScheme(AuthPolicy.getAuthScheme(BearerAuthScheme.AUTH_POLICY));
method.getHostAuthState().setAuthAttempted(true);
}
return super.executeMethod(hostconfig, method, state);
}