mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-01 22:14:01 +03:00
Remove program stop.
This commit is contained in:
parent
cc16748667
commit
fc2289708d
1 changed files with 2 additions and 2 deletions
|
@ -42,7 +42,7 @@ public File getFile() {
|
|||
}
|
||||
|
||||
public void downloadFile() throws IOException {
|
||||
if (!url.getProtocol().equalsIgnoreCase("http")) throw new IOException("Invalid protocol.");
|
||||
if (!(url.getProtocol().equalsIgnoreCase("http") || url.getProtocol().equalsIgnoreCase("https"))) throw new IOException("Invalid protocol.");
|
||||
HttpURLConnection connect = (HttpURLConnection) (url).openConnection();
|
||||
connect.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.95 Safari/537.11"); // for stupid servers
|
||||
connect.setInstanceFollowRedirects(true);
|
||||
|
@ -80,4 +80,4 @@ public void run() {
|
|||
LogHelper.error(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue