mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-17 03:03:23 +02:00
Merge branch 'develop' of https://github.com/pocoproject/poco into develop
This commit is contained in:
@@ -90,10 +90,21 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
|||||||
else
|
else
|
||||||
pSession = new HTTPClientSession(resolvedURI.getHost(), resolvedURI.getPort());
|
pSession = new HTTPClientSession(resolvedURI.getHost(), resolvedURI.getPort());
|
||||||
if (proxyUri.empty())
|
if (proxyUri.empty())
|
||||||
pSession->setProxy(_proxyHost, _proxyPort);
|
{
|
||||||
|
if (!_proxyHost.empty())
|
||||||
|
{
|
||||||
|
pSession->setProxy(_proxyHost, _proxyPort);
|
||||||
|
pSession->setProxyCredentials(_proxyUsername, _proxyPassword);
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
pSession->setProxy(proxyUri.getHost(), proxyUri.getPort());
|
pSession->setProxy(proxyUri.getHost(), proxyUri.getPort());
|
||||||
pSession->setProxyCredentials(_proxyUsername, _proxyPassword);
|
if (!_proxyUsername.empty())
|
||||||
|
{
|
||||||
|
pSession->setProxyCredentials(_proxyUsername, _proxyPassword);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
std::string path = resolvedURI.getPathAndQuery();
|
std::string path = resolvedURI.getPathAndQuery();
|
||||||
if (path.empty()) path = "/";
|
if (path.empty()) path = "/";
|
||||||
@@ -120,7 +131,8 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
|
|||||||
resolvedURI.setUserInfo(username + ":" + password);
|
resolvedURI.setUserInfo(username + ":" + password);
|
||||||
authorize = false;
|
authorize = false;
|
||||||
}
|
}
|
||||||
delete pSession; pSession = 0;
|
delete pSession;
|
||||||
|
pSession = 0;
|
||||||
++redirects;
|
++redirects;
|
||||||
retry = true;
|
retry = true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user