From 66442da08103433df9602b37f41208b0a5f624d2 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Wed, 19 Dec 2012 18:42:38 +0100 Subject: [PATCH] Fixed double upload of files with OAuth + Bearer authorization --- src/eu/alefzero/webdav/WebdavClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } -- 2.11.0