Recognize links without protocol

This commit is contained in:
M66B
2019-04-11 11:52:43 +02:00
parent 2a588443f2
commit 683087bfe4
3 changed files with 7 additions and 2 deletions

View File

@@ -1140,6 +1140,7 @@ public class Helper {
}
InetAddress address = InetAddress.getByName(host);
URL url = new URL("https://ipinfo.io/" + address.getHostAddress() + "/org");
Log.i("GET " + url);
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
connection.setRequestMethod("GET");
connection.setReadTimeout(15 * 1000);