Hello, I am facing a very weird issue. I have a project that uses HttpClient4 to make a simple GET request to Apache Tomcat. It was all working fine.
Now I need to upgrade to HttpClient5. I managed to upgrade very easy - just a small package renames. However when I make the same request the tomcat never responds so eventually the HttpClient throws SocketTimeout exception. I enabled the tomcat server logs and then I tried CURL - works fine and I see this line in the tomcat logs: 2023-08-10 21:34:05,101 org.apache.tomcat.util.net.SecureNioChannel [https-jsse-nio-0.0.0.0-8112-exec-2] DEBUG: The SNI host name extracted for connection [java.nio.channels.SocketChannel[connected local=/127.0.0.1:8112 remote=/127.0.0.1:55478]] was [localhost] when I run it with HttpClient5 I see the SNI host name is null and that seems to me like the only difference. I found this gist which tells how to provide a SNI: https://gist.github.com/jkuipers/e0b35c21c466a9b4d88a but it is for HttpClient4 and I am unable to migrate the code to HttpClient5. So my question is: Is there a way to provide a SNI host name? Thank you -- Regards, Petar! Karlovo, Bulgaria. --- Public PGP Key at: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x19658550C3110611 Key Fingerprint: A369 A7EE 61BC 93A3 CDFF 55A5 1965 8550 C311 0611