Skip to content

Commit

Permalink
Merge pull request arduino#10371 from cmaglie/fix_http_accept_header
Browse files Browse the repository at this point in the history
Fixed invalid http accept header
  • Loading branch information
facchinm authored Jun 16, 2020
2 parents 5693423 + 43da740 commit 7e0df39
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ private HttpURLConnection makeConnection(URL requestURL, int movedTimes,
.toUpperCase().replace("-", "").substring(0, 16);
HttpURLConnection connection = (HttpURLConnection) requestURL
.openConnection(proxy);

// see https://github.com/arduino/Arduino/issues/10264
// Workaround for https://bugs.openjdk.java.net/browse/JDK-8163921
connection.setRequestProperty("Accept", "*/*");

connection.setRequestProperty("User-agent", userAgent);
connection.setRequestProperty("X-Request-ID", requestId);
if (id != null) {
Expand Down

0 comments on commit 7e0df39

Please sign in to comment.