Browse Source

Fix communitcation with hub if it supports only HTTP version 1.1

Julian Raufelder 2 years ago
parent
commit
da2f97b1c4

+ 1 - 1
src/main/java/org/cryptomator/ui/keyloading/hub/ReceiveKeyController.java

@@ -56,7 +56,7 @@ public class ReceiveKeyController implements FxController {
 		this.vaultBaseUri = getVaultBaseUri(vault);
 		this.licenseExceededScene = licenseExceededScene;
 		this.window.addEventHandler(WindowEvent.WINDOW_HIDING, this::windowClosed);
-		this.httpClient = HttpClient.newBuilder().executor(executor).build();
+		this.httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).executor(executor).build();
 	}
 
 	@FXML

+ 1 - 1
src/main/java/org/cryptomator/ui/keyloading/hub/RegisterDeviceController.java

@@ -76,7 +76,7 @@ public class RegisterDeviceController implements FxController {
 		this.registerFailedScene = registerFailedScene;
 		this.jwt = JWT.decode(this.bearerToken);
 		this.window.addEventHandler(WindowEvent.WINDOW_HIDING, this::windowClosed);
-		this.httpClient = HttpClient.newBuilder().executor(executor).build();
+		this.httpClient = HttpClient.newBuilder().version(HttpClient.Version.HTTP_1_1).executor(executor).build();
 	}
 
 	public void initialize() {