Skip to content

Commit 43d855c

Browse files
author
Federico Fissore
committed
Proxy selection was using old logic when url resulted in 302
1 parent 96e0ee2 commit 43d855c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: arduino-core/src/cc/arduino/utils/network/FileDownloader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void download() throws InterruptedException {
145145
if (resp == HttpURLConnection.HTTP_MOVED_PERM || resp == HttpURLConnection.HTTP_MOVED_TEMP) {
146146
URL newUrl = new URL(connection.getHeaderField("Location"));
147147

148-
proxy = ProxySelector.getDefault().select(newUrl.toURI()).get(0);
148+
proxy = new CustomProxySelector(PreferencesData.getMap()).getProxyFor(newUrl.toURI());
149149

150150
// open the new connnection again
151151
connection = (HttpURLConnection) newUrl.openConnection(proxy);

0 commit comments

Comments
 (0)