You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2013/01/26 01:39:17 UTC

android commit: Fix for CB-2284. 401s are appearing when we hit them

Updated Branches:
  refs/heads/master 431ca99c2 -> 56cd24797


Fix for CB-2284. 401s are appearing when we hit them


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/56cd2479
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/56cd2479
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/56cd2479

Branch: refs/heads/master
Commit: 56cd24797e2310dd9af4a865102f7c2a31297505
Parents: 431ca99
Author: Joe Bowser <bo...@apache.org>
Authored: Fri Jan 25 16:39:02 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Fri Jan 25 16:39:02 2013 -0800

----------------------------------------------------------------------
 .../org/apache/cordova/CordovaWebViewClient.java   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/56cd2479/framework/src/org/apache/cordova/CordovaWebViewClient.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/CordovaWebViewClient.java b/framework/src/org/apache/cordova/CordovaWebViewClient.java
index 7a7e6ed..8b023eb 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -230,6 +230,10 @@ public class CordovaWebViewClient extends WebViewClient {
         AuthenticationToken token = this.getAuthenticationToken(host, realm);
         if (token != null) {
             handler.proceed(token.getUserName(), token.getPassword());
+        } 
+        else {
+            // Handle 401 like we'd normally do!
+            super.onReceivedHttpAuthRequest(view, handler, host, realm);
         }
     }