#3089: HTTPSessionFactory does not support HTTPClientSession::ProxyConfig

This commit is contained in:
Günter Obiltschnig
2021-06-15 09:45:01 +02:00
parent d1e9452414
commit 59ae91e5ba
6 changed files with 72 additions and 93 deletions

View File

@@ -41,10 +41,9 @@ 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);
if (!proxyHost().empty())
if (!getProxyConfig().host.empty())
{
pSession->setProxy(proxyHost(), proxyPort());
pSession->setProxyCredentials(proxyUsername(), proxyPassword());
pSession->setProxyConfig(getProxyConfig());
}
return pSession;
}