[
https://issues.apache.org/jira/browse/HTTPCLIENT-2198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480367#comment-17480367
]
ASF subversion and git services commented on HTTPCLIENT-2198:
-------------------------------------------------------------
Commit 75e8dc6f9bf8b2e80924bf6d0420790c20ad97fa in httpcomponents-client's
branch refs/heads/master from Andrei Vasilev
[ https://gitbox.apache.org/repos/asf?p=httpcomponents-client.git;h=75e8dc6 ]
HTTPCLIENT-2198, Fixed NPE in TlsConfig.toString()
Replaced called to Arrays.asList() to Arrays.toString(), which allows for null
argument.
> 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: 40m
> 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: [email protected]
For additional commands, e-mail: [email protected]