ContactsSyncManager: URL fix

* ContactsSyncManager: don't try to download external resources which do not have a valid URL
This commit is contained in:
Ricki Hirner 2015-11-20 10:12:48 +01:00
parent 39e6fc8373
commit 8da4725c7c

View file

@ -265,6 +265,11 @@ public class ContactsSyncManager extends SyncManager {
public byte[] download(String url, String accepts) {
HttpUrl httpUrl = HttpUrl.parse(url);
if (httpUrl == null) {
log.error("Invalid external resource URL");
return null;
}
String host = httpUrl.host();
if (host == null) {
log.error("External resource URL doesn't specify a host name");