From af844a1272857c3b256ac4a7666d933fdbfc9730 Mon Sep 17 00:00:00 2001 From: Ahson Khan Date: Wed, 27 Jan 2021 12:31:53 -0800 Subject: [PATCH] Do not pass a placeholder user-agent string as a fallback when using WinHttp (#1495) Verified the behavior is now as expected when telemetry policy is turned off. **Before:** ![image](https://user-images.githubusercontent.com/6527137/106042018-65d64e00-6091-11eb-8741-c6c42cb028d3.png) **After:** ![image](https://user-images.githubusercontent.com/6527137/106042157-86060d00-6091-11eb-9699-929128eb6ea1.png) --- sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp b/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp index 1c3e170c9..456b8b573 100644 --- a/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp +++ b/sdk/core/azure-core/src/http/winhttp/win_http_transport.cpp @@ -189,7 +189,8 @@ void WinHttpTransport::CreateSessionHandle(std::unique_ptrm_sessionHandle = WinHttpOpen( - L"WinHTTP Azure SDK", + NULL, // Do not use a fallback user-agent string, and only rely on the header within the + // request itself. WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS,