added nonProxyHosts to ProxyConfig to allow bypassing proxy for certain hosts

This commit is contained in:
Guenter Obiltschnig
2014-11-11 22:54:44 +01:00
parent b576a66c4b
commit 781acfa0bd
6 changed files with 63 additions and 16 deletions

View File

@@ -1,7 +1,7 @@
//
// HTTPSClientSession.cpp
//
// $Id: //poco/1.4/NetSSL_Win/src/HTTPSClientSession.cpp#3 $
// $Id: //poco/1.4/NetSSL_Win/src/HTTPSClientSession.cpp#4 $
//
// Library: NetSSL_Win
// Package: HTTPSClient
@@ -145,7 +145,7 @@ void HTTPSClientSession::proxyAuthenticate(HTTPRequest& request)
void HTTPSClientSession::connect(const SocketAddress& address)
{
if (getProxyHost().empty())
if (getProxyHost().empty() || bypassProxy())
{
SecureStreamSocket sss(socket());
if (_pContext->sessionCacheEnabled())
@@ -176,7 +176,8 @@ int HTTPSClientSession::read(char* buffer, std::streamsize length)
try
{
return HTTPSession::read(buffer, length);
} catch(SSLConnectionUnexpectedlyClosedException&)
}
catch(SSLConnectionUnexpectedlyClosedException&)
{
return 0;
}