gpt4 book ai didi

java - HTTPS 主机名错误 : should be ,检查 URLSpoofing。传递的主机名是什么?

转载 作者:太空宇宙 更新时间:2023-11-03 15:03:25 27 4
gpt4 key购买 nike

我收到的错误是

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 证书的选项。

最佳答案

问题是主机文件条目被我后面的代理覆盖了。通过离开站点解决了问题。

关于java - HTTPS 主机名错误 : should be <xxx. xxx.xxx.xxx>,检查 URLSpoofing。传递的主机名是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16990799/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com