mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Proxy selection was using old logic when url resulted in 302
This commit is contained in:
parent
96e0ee2a67
commit
43d855c28b
@ -145,7 +145,7 @@ public class FileDownloader extends Observable {
|
||||
if (resp == HttpURLConnection.HTTP_MOVED_PERM || resp == HttpURLConnection.HTTP_MOVED_TEMP) {
|
||||
URL newUrl = new URL(connection.getHeaderField("Location"));
|
||||
|
||||
proxy = ProxySelector.getDefault().select(newUrl.toURI()).get(0);
|
||||
proxy = new CustomProxySelector(PreferencesData.getMap()).getProxyFor(newUrl.toURI());
|
||||
|
||||
// open the new connnection again
|
||||
connection = (HttpURLConnection) newUrl.openConnection(proxy);
|
||||
|
Loading…
Reference in New Issue
Block a user