You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Carter Kozak (Jira)" <ji...@apache.org> on 2020/07/27 22:08:00 UTC

[jira] [Commented] (HTTPCORE-640) Response out of order detection fails on java 13+ plain http connections

    [ https://issues.apache.org/jira/browse/HTTPCORE-640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17165982#comment-17165982 ] 

Carter Kozak commented on HTTPCORE-640:
---------------------------------------

Proposed fix is here:
https://github.com/apache/httpcomponents-core/pull/207

> Response out of order detection fails on java 13+ plain http connections
> ------------------------------------------------------------------------
>
>                 Key: HTTPCORE-640
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-640
>             Project: HttpComponents HttpCore
>          Issue Type: New Feature
>          Components: HttpCore
>    Affects Versions: 5.0.1
>            Reporter: Carter Kozak
>            Priority: Major
>
> Response out of order detection relies on socket.getInputStream().available(), which works for non-ssl sockets on java releases up to and including 12. This approach appears not to work as expected on java 13 and newer due to the socket refactor [https://openjdk.java.net/jeps/353] as the socket inputstream is no longer a FileInputStream.
> My proposal is to update the check from "socket instanceof SSLSocket" to "!(socketInputStream instanceof FileInputStream)" to take into account both jep353 and the fast path on plain connections in older java versions.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org