Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat(tls): allow disabling protocol upgrade" #1414

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading