Merge branch 'develop' of https://github.com/pocoproject/poco into develop

This commit is contained in:
Guenter Obiltschnig
2014-11-10 22:57:09 +01:00

View File

@@ -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;
} }