From: David A. Velasco Date: Wed, 19 Dec 2012 17:42:38 +0000 (+0100) Subject: Fixed double upload of files with OAuth + Bearer authorization X-Git-Tag: oc-android-1.4.3~29^2~18^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/66442da08103433df9602b37f41208b0a5f624d2?ds=inline;hp=--cc Fixed double upload of files with OAuth + Bearer authorization --- 66442da08103433df9602b37f41208b0a5f624d2 diff --git a/src/eu/alefzero/webdav/WebdavClient.java b/src/eu/alefzero/webdav/WebdavClient.java index d92d0973..e326b6bd 100644 --- a/src/eu/alefzero/webdav/WebdavClient.java +++ b/src/eu/alefzero/webdav/WebdavClient.java @@ -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); }