From 1b5fdb99d97445667f3b98ec190b9f348ea79d30 Mon Sep 17 00:00:00 2001 From: Matthew Brace Date: Thu, 2 Apr 2009 01:52:00 +0000 Subject: [PATCH] Fix for authentication issue describe in issue 359. --- src/com/android/email/mail/store/WebDavStore.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/email/mail/store/WebDavStore.java b/src/com/android/email/mail/store/WebDavStore.java index 57cc40f5e..ee22c0892 100644 --- a/src/com/android/email/mail/store/WebDavStore.java +++ b/src/com/android/email/mail/store/WebDavStore.java @@ -684,7 +684,10 @@ public class WebDavStore extends Store { if (needAuth()) { if (!checkAuth()) { try { - CookieStore cookies = doAuthentication(this.mUsername, this.mPassword, this.mUrl); + CookieStore cookies = mHttpClient.getCookieStore(); + cookies.clear(); + mHttpClient.setCookieStore(cookies); + cookies = doAuthentication(this.mUsername, this.mPassword, this.mUrl); if (cookies != null) { this.mAuthenticated = true; this.mLastAuth = System.currentTimeMillis()/1000;