mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-14 22:33:04 +02:00
fixed GH# 1184: Attempting to connect via a proxy throws a DNS error "Host not found"
This commit is contained in:
parent
57fa40e15e
commit
b2ac870240
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user