Skip to content

Commit

Permalink
Set default user agent for range requests (#3645)
Browse files Browse the repository at this point in the history
  • Loading branch information
yao-msft committed Sep 21, 2023
1 parent 7854e67 commit 5de147c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AppInstallerCommonCore/HttpStream/HttpClientWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "pch.h"
#include "Public/AppInstallerStrings.h"
#include "HttpClientWrapper.h"
#include "Public/AppInstallerRuntime.h"

using namespace winrt::Windows::Foundation;
using namespace winrt::Windows::Security::Cryptography;
Expand Down Expand Up @@ -32,6 +33,7 @@ namespace AppInstaller::Utility::HttpStream

instance->m_httpClient.DefaultRequestHeaders().Connection().Clear();
instance->m_httpClient.DefaultRequestHeaders().Append(L"Connection", L"Keep-Alive");
instance->m_httpClient.DefaultRequestHeaders().UserAgent().ParseAdd(Utility::ConvertToUTF16(Runtime::GetDefaultUserAgent().get()));

co_await instance->PopulateInfoAsync();

Expand Down

0 comments on commit 5de147c

Please sign in to comment.