mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 16:48:06 +02:00
HTTPSessionInstantiator: respect global proxy config
This commit is contained in:
@@ -41,8 +41,11 @@ HTTPClientSession* HTTPSessionInstantiator::createClientSession(const Poco::URI&
|
||||
{
|
||||
poco_assert (uri.getScheme() == "http");
|
||||
HTTPClientSession* pSession = new HTTPClientSession(uri.getHost(), uri.getPort());
|
||||
pSession->setProxy(proxyHost(), proxyPort());
|
||||
pSession->setProxyCredentials(proxyUsername(), proxyPassword());
|
||||
if (!proxyHost().empty())
|
||||
{
|
||||
pSession->setProxy(proxyHost(), proxyPort());
|
||||
pSession->setProxyCredentials(proxyUsername(), proxyPassword());
|
||||
}
|
||||
return pSession;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user