mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-31 20:52:13 +01:00
Fixed invalid http accept header
This patch overrides the default JDK accept header that happens to be invalid, as per RFC 7231. Real issue: https://bugs.openjdk.java.net/browse/JDK-8163921 Fix https://github.com/arduino/Arduino/issues/10264
This commit is contained in:
parent
5693423bfe
commit
43da7400e4
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user