fixed GH# 1184: Attempting to connect via a proxy throws a DNS error "Host not found"

This commit is contained in:
Guenter Obiltschnig 2016-03-10 09:54:08 +01:00
parent 57fa40e15e
commit b2ac870240

View File

@ -376,8 +376,15 @@ long SecureSocketImpl::verifyPeerCertificateImpl(const std::string& hostName)
bool SecureSocketImpl::isLocalHost(const std::string& hostName)
{
SocketAddress addr(hostName, 0);
return addr.host().isLoopback();
try
{
SocketAddress addr(hostName, 0);
return addr.host().isLoopback();
}
catch (Poco::Exception&)
{
return false;
}
}