remove state from transport and use the HandleManager instead

This commit is contained in:
Victor Vazquez 2022-04-14 18:27:27 +00:00
parent d9d7376cbe
commit 3fe45ca6cd
2 changed files with 5 additions and 6 deletions

View File

@ -176,8 +176,6 @@ namespace Azure { namespace Core { namespace Http {
std::unique_ptr<RawResponse> SendRequestAndGetResponse(
std::unique_ptr<_detail::HandleManager> handleManager,
HttpMethod requestMethod);
// This option can be set only using context option
bool m_noClientCert = false;
public:
/**

View File

@ -360,7 +360,11 @@ void WinHttpTransport::CreateRequestHandle(std::unique_ptr<_detail::HandleManage
}
// Option is set up by context settings only and is only available for SDK clients
if (m_noClientCert)
using namespace Azure::Core::Http::_internal;
auto noClientCert = WinHttpTransportContextProvider::HasNoClientCertificateConfiguration(
handleManager->m_context);
if (noClientCert)
{
// If the service requests TLS client certificates, we want to let the WinHTTP APIs know that
// it's ok to initiate the request without a client certificate.
@ -672,9 +676,6 @@ std::unique_ptr<RawResponse> WinHttpTransport::SendRequestAndGetResponse(
std::unique_ptr<RawResponse> WinHttpTransport::Send(Request& request, Context const& context)
{
using namespace Azure::Core::Http::_internal;
m_noClientCert = WinHttpTransportContextProvider::HasNoClientCertificateConfiguration(context);
auto handleManager = std::make_unique<_detail::HandleManager>(request, context);
CreateSessionHandle(handleManager);