Carter Kozak created HTTPCORE-640:
-------------------------------------

             Summary: 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


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-unsubscr...@hc.apache.org
For additional commands, e-mail: dev-h...@hc.apache.org

Reply via email to