[英]How to convert a ip string xxx.xxx.xxx.xxx:xxxxx to xxx.xxx.xxx.xxx?
[英]HTTPS hostname wrong: should be <xxx.xxx.xxx.xxx>, checkURLSpoofing. What is the host name being passed?
我收到的錯誤是
com.sun.xml.ws.client.ClientTransportException: HTTP transport error: java.io.IOException: HTTPS hostname wrong: should be <xxx.xxx.xxx.xxx>
at sun.net.www.protocol.https.HttpsClient.checkURLSpoofing(HttpsClient.java:524)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:448)
我的問題是,如何獲取傳遞給checkURLSpoofing的值? 我的意圖是在我的主機文件中重新路由它。 我已經在使用此代碼塊來阻止主機名驗證,盡管我相信它仍在發生。
HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier()
{
public boolean verify(String hostname, SSLSession session)
{
return true;
}
});
我還將此添加到運行配置中以防止主機名驗證
-Dweblogic.security.SSL.ignoreHostnameVerification=true
我也沒有更改SSL證書的選項。
問題是主機文件條目被我背后的代理覆蓋。 通過離開現場解決了該問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.