[ 
https://issues.apache.org/jira/browse/HTTPCLIENT-2182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Oleg Kalnichevski resolved HTTPCLIENT-2182.
-------------------------------------------
    Fix Version/s: 5.2-alpha1
       Resolution: Fixed

> [CloseableHttpAsyncClient] HttpVersionPolicy.NEGOTIATE Not working with Open 
> JDK >= 16
> --------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-2182
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2182
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient (async)
>    Affects Versions: 5.1
>            Reporter: Youssouf Maiga
>            Priority: Major
>             Fix For: 5.2-alpha1
>
>
> CloseableHttpAsyncClient with  HttpVersionPolicy.NEGOTIATE is NOT working 
> with Open JDK greater or equals 16. When we force HttpVersionPolicy to HTTP_1 
> or HTTP_2, we do not face any issue. The issue happens only with 
> HttpVersionPolicy.NEGOTIATE.
> We have the Following exception :
> {code:java}
> Executing request GET https://nghttp2.org/httpbin/
> GET 
> https://nghttp2.org/httpbin/->org.apache.hc.core5.http.ConnectionClosedException:
>  Connection closed by peer
> Exception in thread "main" java.util.concurrent.ExecutionException: 
> org.apache.hc.core5.http.ConnectionClosedException: Connection closed by peer
>       at 
> org.apache.hc.core5.concurrent.BasicFuture.getResult(BasicFuture.java:72)
>       at org.apache.hc.core5.concurrent.BasicFuture.get(BasicFuture.java:85)
>       at org.apache.hc.client5.http.examples.main(AsyncClientTlsAlpn.java:85)
> Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection 
> closed by peer
>       at 
> org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:341)
>       at 
> org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
>       at 
> org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:39)
>       at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:549)
>       at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72)
>       at 
> org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
>       at 
> org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
>       at 
> org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
>       at 
> org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
>       at 
> org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
>       at 
> org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
>       at 
> org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
>       at java.base/java.lang.Thread.run(Thread.java:833)
> {code}
> In order to reproduce : 
> Execute the following java class ([ 
> https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java|https://raw.githubusercontent.com/apache/httpcomponents-client/5.1.x/httpclient5/src/test/java/org/apache/hc/client5/http/examples/AsyncClientTlsAlpn.java]
>  ) with a version of _OpenJDK <= 15_ then you will succesfully get the 
> result. After, execute the same class with _OpenJDK 17,_ then you you will 
> face the issue.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to