mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-10-15 15:59:18 +00:00
ContactsSyncManager: URL fix
* ContactsSyncManager: don't try to download external resources which do not have a valid URL
This commit is contained in:
parent
39e6fc8373
commit
8da4725c7c
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue