You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (Jira)" <ji...@apache.org> on 2022/01/21 08:07:00 UTC
[jira] [Resolved] (HTTPCLIENT-2198) HttpVersionPolicy is not respected
[ https://issues.apache.org/jira/browse/HTTPCLIENT-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Oleg Kalnichevski resolved HTTPCLIENT-2198.
-------------------------------------------
Fix Version/s: 5.2-alpha2
Resolution: Fixed
> HttpVersionPolicy is not respected
> ----------------------------------
>
> Key: HTTPCLIENT-2198
> URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2198
> Project: HttpComponents HttpClient
> Issue Type: Bug
> Components: HttpClient (async)
> Affects Versions: 5.2-alpha1
> Reporter: Andrei Vasilev
> Priority: Minor
> Fix For: 5.2-alpha2
>
> Attachments: Main.java
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The HttpVersionPolicy when set via the new TlsConfig class is not respected due to the wrong data being passed between AbstractClientTlsStrategy and H2TlsSupport.
> On line 138 of AbstractClientTlsStrategy, the H2TlsSupport.selectApplicationProtocols() method expects a type of HttpVersionPolicy to be provided, but AbstractClientTlsStrategy passes the entire TlsConfig. Since the types do not match H2TlsSupport defaults to the NEGOTIATE protocol and ignores the value set in TlsConfig.
> This results in all sorts of random behavior depending on the target host being requested, but in all cases requests will fail with some sort of error. I have attached a sample program to reproduce the issue.
> On a side note, the toString() method of TlsConfig also results in a NullPointerException if the cipher suites / protocols fields are not initialized and null is passed to Arrays.toList().
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org