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/03/07 00:31:35 UTC

[1/2] android commit: Making framework only apply for http resources for now, so we don't break non-http handling. I had to squash this to make it pretty

Making framework only apply for http resources for now, so we don't break non-http handling.  I had to squash this to make it pretty


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

Branch: refs/heads/master
Commit: 7388c036d7edab7dc99c306347d6c3a7532b5e30
Parents: 409b9af
Author: Joe Bowser <bo...@apache.org>
Authored: Wed Mar 6 15:26:13 2013 -0800
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Mar 6 15:29:40 2013 -0800

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


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/7388c036/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 b1aa0f0..b937d98 100755
--- a/framework/src/org/apache/cordova/CordovaWebViewClient.java
+++ b/framework/src/org/apache/cordova/CordovaWebViewClient.java
@@ -221,8 +221,8 @@ public class CordovaWebViewClient extends WebViewClient {
      */
     @Override
     public WebResourceResponse shouldInterceptRequest(WebView view, String url) {
-        //If something isn't whitelisted, just send a blank response
-        if(!Config.isUrlWhiteListed(url))
+      //If something isn't whitelisted, just send a blank response
+        if(!Config.isUrlWhiteListed(url) && (url.startsWith("http://") || url.startsWith("https://")))
         {
             return getWhitelistResponse();
         }