mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-01 02:12:58 +08:00
Merge pull request #110 from Worklight/isReachble_fix
Fix bug where isReachable doesn't return correct results for https
This commit is contained in:
commit
939754e1c9
@ -275,7 +275,7 @@ public class NetworkManager extends Plugin {
|
||||
public int isReachable(String uri, boolean isIpAddress) {
|
||||
int reachable = NOT_REACHABLE;
|
||||
|
||||
if (uri.indexOf("http://") == -1) {
|
||||
if (uri.indexOf("http://") == -1 && uri.indexOf("https://") == -1) {
|
||||
uri = "http://" + uri;
|
||||
}
|
||||
|
||||
@ -298,4 +298,4 @@ public class NetworkManager extends Plugin {
|
||||
|
||||
return reachable;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user