mirror of
https://github.com/pocoproject/poco.git
synced 2025-05-02 15:41:36 +02:00
fixed GH #1303: HTTPSClientSession::sendRequest() fails if server has wildcard cert
This commit is contained in:
parent
f848106fca
commit
0b30bacb41
@ -64,8 +64,6 @@ HTTPSClientSession::HTTPSClientSession(const std::string& host, Poco::UInt16 por
|
||||
{
|
||||
setHost(host);
|
||||
setPort(port);
|
||||
SecureStreamSocket sss(socket());
|
||||
sss.setPeerHostName(host);
|
||||
}
|
||||
|
||||
|
||||
@ -90,8 +88,6 @@ HTTPSClientSession::HTTPSClientSession(const std::string& host, Poco::UInt16 por
|
||||
{
|
||||
setHost(host);
|
||||
setPort(port);
|
||||
SecureStreamSocket sss(socket());
|
||||
sss.setPeerHostName(host);
|
||||
}
|
||||
|
||||
|
||||
@ -102,8 +98,6 @@ HTTPSClientSession::HTTPSClientSession(const std::string& host, Poco::UInt16 por
|
||||
{
|
||||
setHost(host);
|
||||
setPort(port);
|
||||
SecureStreamSocket sss(socket());
|
||||
sss.setPeerHostName(host);
|
||||
}
|
||||
|
||||
|
||||
@ -148,6 +142,10 @@ void HTTPSClientSession::connect(const SocketAddress& address)
|
||||
if (getProxyHost().empty() || bypassProxy())
|
||||
{
|
||||
SecureStreamSocket sss(socket());
|
||||
if (sss.getPeerHostName().empty())
|
||||
{
|
||||
sss.setPeerHostName(getHost());
|
||||
}
|
||||
if (_pContext->sessionCacheEnabled())
|
||||
{
|
||||
sss.useSession(_pSession);
|
||||
|
Loading…
x
Reference in New Issue
Block a user