Skip to content

Commit 9ef0d4c

Browse files
committed
Fix Downloader
Addresses #4496. Enough to get JRE downloads to work again.
1 parent b4882e1 commit 9ef0d4c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

build/jre/src/Downloader.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,10 @@ void download() throws IOException {
158158
}
159159
List<String> cookies = headers.get("Set-Cookie");
160160
conn = (HttpURLConnection) new URL(url).openConnection();
161-
for (String cookie : cookies) {
162-
conn.setRequestProperty("Cookie", cookie);
161+
if (cookies != null) {
162+
for (String cookie : cookies) {
163+
conn.setRequestProperty("Cookie", cookie);
164+
}
163165
}
164166
conn.setRequestProperty("Cookie", COOKIE);
165167
conn.connect();

0 commit comments

Comments
 (0)