Server Name Indication (SNI) on Java

前端 未结 5 902
挽巷
挽巷 2020-12-14 11:37

Can anyone help me get started on carrying out HTTP connections with server name indication in Java?

I\'m trying to request content from a site I\'m adminstering. I\

5条回答
  •  时光取名叫无心
    2020-12-14 11:58

    you might want to track https://issues.apache.org/jira/browse/HTTPCLIENT-1119

    the underlying client implementation of Java 7 is capable to support it and exposes the feature via SSLSocketImpl#setHost (called by sun.net.www.protocol.https.HttpsClient

    on Java 7 use

        new URL("https://cmbntr.sni.velox.ch/").openStream()
    

    until HTTPCLIENT-1119 is fixed

提交回复
热议问题