Root domain fix

pull/207/head
M66B 4 years ago
parent 4a51f866e6
commit 63a4585592

@ -102,12 +102,12 @@ public class UriHelper {
String tld = getTld(context, host); String tld = getTld(context, host);
if (tld == null) if (tld == null)
return null; return null;
if (tld.equals(host)) if (tld.equalsIgnoreCase(host))
return null; return null;
int len = host.length() - tld.length() - 1; int len = host.length() - tld.length() - 1;
if (len < 0) { if (len < 0) {
Log.e("getRootDomain host=" + host + " tld=" + tld); Log.e("getRootDomain host=" + host + " tld=" + tld);
return host; return null;
} }
int dot = host.substring(0, len).lastIndexOf('.'); int dot = host.substring(0, len).lastIndexOf('.');
if (dot < 0) if (dot < 0)

Loading…
Cancel
Save