Update libcurl transport pool to include all options into connection key (#6583)
Co-authored-by: Anton Kolesnyk <antkmsft@users.noreply.github.com>
This commit is contained in:
parent
c6d553b2a2
commit
6c6c4e9b35
@ -1414,6 +1414,10 @@ inline std::string GetConnectionKey(std::string const& host, CurlTransportOption
|
||||
key.append(",");
|
||||
key.append(options.SslOptions.AllowFailedCrlRetrieval ? "FC" : "0");
|
||||
key.append(",");
|
||||
key.append(options.EnableCurlTracing ? "1" : "0");
|
||||
key.append(",");
|
||||
key.append(options.EnableCurlSslCaching ? "1" : "0");
|
||||
key.append(",");
|
||||
#if LIBCURL_VERSION_NUM >= 0x074D00 // 7.77.0
|
||||
key.append(
|
||||
!options.SslOptions.PemEncodedExpectedRootCertificates.empty() ? std::to_string(
|
||||
|
||||
@ -58,7 +58,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
std::string const expectedConnectionKey(CreateConnectionKey(
|
||||
AzureSdkHttpbinServer::Schema(),
|
||||
AzureSdkHttpbinServer::Host(),
|
||||
",0,0,0,0,0,1,1,0,0,0,0"));
|
||||
",0,0,0,0,0,1,1,0,0,0,1,0,0"));
|
||||
|
||||
{
|
||||
// Creating a new connection with default options
|
||||
@ -129,7 +129,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
|
||||
// Now test that using a different connection config won't re-use the same connection
|
||||
std::string const secondExpectedKey = AzureSdkHttpbinServer::Schema() + "://"
|
||||
+ AzureSdkHttpbinServer::Host() + ",0,0,0,0,0,1,0,0,0,0,200000";
|
||||
+ AzureSdkHttpbinServer::Host() + ",0,0,0,0,0,1,0,0,0,0,1,0,200000";
|
||||
{
|
||||
// Creating a new connection with options
|
||||
Azure::Core::Http::CurlTransportOptions options;
|
||||
@ -441,7 +441,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
std::string const expectedConnectionKey(CreateConnectionKey(
|
||||
AzureSdkHttpbinServer::Schema(),
|
||||
AzureSdkHttpbinServer::Host(),
|
||||
",0,0,0,0,0,1,1,0,0,0,0"));
|
||||
",0,0,0,0,0,1,1,0,0,0,1,0,0"));
|
||||
|
||||
// Creating a new connection with default options
|
||||
auto connection = Azure::Core::Http::_detail::CurlConnectionPool::g_curlConnectionPool
|
||||
@ -479,7 +479,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
std::string const expectedConnectionKey(CreateConnectionKey(
|
||||
AzureSdkHttpbinServer::Schema(),
|
||||
AzureSdkHttpbinServer::Host(),
|
||||
":443,0,0,0,0,0,1,1,0,0,0,0"));
|
||||
":443,0,0,0,0,0,1,1,0,0,0,1,0,0"));
|
||||
|
||||
// Creating a new connection with default options
|
||||
auto connection = Azure::Core::Http::_detail::CurlConnectionPool::g_curlConnectionPool
|
||||
@ -518,7 +518,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
std::string const expectedConnectionKey(CreateConnectionKey(
|
||||
AzureSdkHttpbinServer::Schema(),
|
||||
AzureSdkHttpbinServer::Host(),
|
||||
",0,0,0,0,0,1,1,0,0,0,0"));
|
||||
",0,0,0,0,0,1,1,0,0,0,1,0,0"));
|
||||
|
||||
// Creating a new connection with default options
|
||||
auto connection = Azure::Core::Http::_detail::CurlConnectionPool::g_curlConnectionPool
|
||||
@ -555,7 +555,7 @@ namespace Azure { namespace Core { namespace Test {
|
||||
std::string const expectedConnectionKey(CreateConnectionKey(
|
||||
AzureSdkHttpbinServer::Schema(),
|
||||
AzureSdkHttpbinServer::Host(),
|
||||
":443,0,0,0,0,0,1,1,0,0,0,0"));
|
||||
":443,0,0,0,0,0,1,1,0,0,0,1,0,0"));
|
||||
|
||||
// Creating a new connection with default options
|
||||
auto connection = Azure::Core::Http::_detail::CurlConnectionPool::g_curlConnectionPool
|
||||
|
||||
Loading…
Reference in New Issue
Block a user