1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-21 10:52:14 +01:00

Merge pull request #10371 from cmaglie/fix_http_accept_header

Fixed invalid http accept header
This commit is contained in:
Martino Facchin 2020-06-16 11:31:09 +02:00 committed by GitHub
commit 7e0df39c99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,6 +128,11 @@ public class HttpConnectionManager {
.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) {