Skip to content

Commit

Permalink
Revert "feat(tls): allow disabling protocol upgrade (#1409)" (#1414)
Browse files Browse the repository at this point in the history
This reverts commit edc79d8.
  • Loading branch information
DjoykeAbyah authored Dec 30, 2024
1 parent edc79d8 commit cc52b02
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
13 changes: 0 additions & 13 deletions src/main/java/com/adyen/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/adyen/httpclient/AdyenHttpClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -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()));
Expand Down

0 comments on commit cc52b02

Please sign in to comment.