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,11 +90,22 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
else
pSession = new HTTPClientSession(resolvedURI.getHost(), resolvedURI.getPort());
if (proxyUri.empty())
{
if (!_proxyHost.empty())
{
pSession->setProxy(_proxyHost, _proxyPort);
else
pSession->setProxy(proxyUri.getHost(), proxyUri.getPort());
pSession->setProxyCredentials(_proxyUsername, _proxyPassword);
}
}
else
{
pSession->setProxy(proxyUri.getHost(), proxyUri.getPort());
if (!_proxyUsername.empty())
{
pSession->setProxyCredentials(_proxyUsername, _proxyPassword);
}
}
}
std::string path = resolvedURI.getPathAndQuery();
if (path.empty()) path = "/";
HTTPRequest req(HTTPRequest::HTTP_GET, path, HTTPMessage::HTTP_1_1);
@@ -120,7 +131,8 @@ std::istream* HTTPSStreamFactory::open(const URI& uri)
resolvedURI.setUserInfo(username + ":" + password);
authorize = false;
}
delete pSession; pSession = 0;
delete pSession;
pSession = 0;
++redirects;
retry = true;
}