From cab4c6ce28e29cb0c6ea71b72bbd477d91dd97b7 Mon Sep 17 00:00:00 2001 From: Djoyke Reijans <115019123+DjoykeAbyah@users.noreply.github.com> Date: Mon, 30 Dec 2024 11:15:27 +0100 Subject: [PATCH] Revert "feat(tls): allow disabling protocol upgrade (#1409)" This reverts commit edc79d8f73185758c580236a6e45dc65feeceaa0. --- src/main/java/com/adyen/Config.java | 13 ------------- .../java/com/adyen/httpclient/AdyenHttpClient.java | 3 --- 2 files changed, 16 deletions(-) diff --git a/src/main/java/com/adyen/Config.java b/src/main/java/com/adyen/Config.java index a95f803ed..dae821953 100644 --- a/src/main/java/com/adyen/Config.java +++ b/src/main/java/com/adyen/Config.java @@ -17,7 +17,6 @@ public class Config { protected String apiKey; protected int connectionTimeoutMillis; protected int readTimeoutMillis; - protected Boolean protocolUpgradeEnabled; //Terminal API Specific protected String terminalApiCloudEndpoint; @@ -102,18 +101,6 @@ public void setReadTimeoutMillis(int readTimeoutMillis) { this.readTimeoutMillis = readTimeoutMillis; } - public Boolean getProtocolUpgradeEnabled() { - return protocolUpgradeEnabled; - } - - /** - * Whether the HTTP requests should automatically attempt to upgrade to a safer/newer version of the protocol. - * See also {@link RequestConfig.Builder#setProtocolUpgradeEnabled(boolean)}. - */ - public void setProtocolUpgradeEnabled(Boolean protocolUpgradeEnabled) { - this.protocolUpgradeEnabled = protocolUpgradeEnabled; - } - public String getLiveEndpointUrlPrefix() { return this.liveEndpointUrlPrefix; } diff --git a/src/main/java/com/adyen/httpclient/AdyenHttpClient.java b/src/main/java/com/adyen/httpclient/AdyenHttpClient.java index adb4ff704..10dbb44b8 100644 --- a/src/main/java/com/adyen/httpclient/AdyenHttpClient.java +++ b/src/main/java/com/adyen/httpclient/AdyenHttpClient.java @@ -121,9 +121,6 @@ private HttpUriRequestBase createRequest(String endpoint, String requestBody, Co if (config.getConnectionTimeoutMillis() > 0) { builder.setConnectTimeout(config.getConnectionTimeoutMillis(), TimeUnit.MILLISECONDS); } - if (config.getProtocolUpgradeEnabled() != null) { - builder.setProtocolUpgradeEnabled(config.getProtocolUpgradeEnabled()); - } if (proxy != null && proxy.address() instanceof InetSocketAddress) { InetSocketAddress inetSocketAddress = (InetSocketAddress) proxy.address(); builder.setProxy(new HttpHost(inetSocketAddress.getHostName(), inetSocketAddress.getPort()));