From d4c0e961ab69a8e170534b290bfd9276dcdf0078 Mon Sep 17 00:00:00 2001 From: Andrei Vasilev <59628447+AndreiSVasilev@users.noreply.github.com> Date: Thu, 20 Jan 2022 14:29:38 -0800 Subject: [PATCH] HTTPCLIENT-2198, Fixed AbstractClientTlsStrategy to respect HttpVersionPolicy Updated AbstractClientTlsStrategy to pass only the HttpVersionPolicy set by TlsConfig instead of the entire TlsConfig to H2TlsSupport.selectApplicationProtocols() method. --- .../apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java index 21c72c34a..8818afb91 100644 --- a/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java +++ b/httpclient5/src/main/java/org/apache/hc/client5/http/ssl/AbstractClientTlsStrategy.java @@ -135,7 +135,7 @@ abstract class AbstractClientTlsStrategy implements TlsStrategy { H2TlsSupport.setEnableRetransmissions(sslParameters, false); } - applyParameters(sslEngine, sslParameters, H2TlsSupport.selectApplicationProtocols(attachment)); + applyParameters(sslEngine, sslParameters, H2TlsSupport.selectApplicationProtocols(versionPolicy)); initializeEngine(sslEngine);