mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-02 23:42:29 +02:00
fixed GH# 1184: Attempting to connect via a proxy throws a DNS error "Host not found"
This commit is contained in:
parent
f594c134ae
commit
ee9477afd3
@ -376,8 +376,15 @@ long SecureSocketImpl::verifyPeerCertificateImpl(const std::string& hostName)
|
|||||||
|
|
||||||
bool SecureSocketImpl::isLocalHost(const std::string& hostName)
|
bool SecureSocketImpl::isLocalHost(const std::string& hostName)
|
||||||
{
|
{
|
||||||
SocketAddress addr(hostName, 0);
|
try
|
||||||
return addr.host().isLoopback();
|
{
|
||||||
|
SocketAddress addr(hostName, 0);
|
||||||
|
return addr.host().isLoopback();
|
||||||
|
}
|
||||||
|
catch (Poco::Exception&)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user