NetSSL_Win: HTTPSSessionInstantiator: respect global proxy config

This commit is contained in:
Guenter Obiltschnig
2015-09-17 12:00:19 +02:00
parent 619950bb2a
commit 25c3d96d79

View File

@@ -43,8 +43,11 @@ HTTPClientSession* HTTPSSessionInstantiator::createClientSession(const Poco::URI
{
poco_assert (uri.getScheme() == "https");
HTTPSClientSession* pSession = _pContext.isNull() ? new HTTPSClientSession(uri.getHost(), uri.getPort()) : new HTTPSClientSession(uri.getHost(), uri.getPort(), _pContext);
pSession->setProxy(proxyHost(), proxyPort());
pSession->setProxyCredentials(proxyUsername(), proxyPassword());
if (!proxyHost().empty())
{
pSession->setProxy(proxyHost(), proxyPort());
pSession->setProxyCredentials(proxyUsername(), proxyPassword());
}
return pSession;
}