Disable HTTP cache when reading the distribution manifest over HTTP (#13383)

This commit is contained in:
Blue 2025-08-13 11:29:25 -07:00 committed by GitHub
parent 17bd3716b4
commit 6121b56152
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -101,7 +101,11 @@ DistributionList ReadFromManifest(const std::wstring& url)
}
else
{
const winrt::Windows::Web::Http::HttpClient client;
const winrt::Windows::Web::Http::Filters::HttpBaseProtocolFilter filter;
filter.CacheControl().WriteBehavior(winrt::Windows::Web::Http::Filters::HttpCacheWriteBehavior::NoCache);
filter.CacheControl().ReadBehavior(winrt::Windows::Web::Http::Filters::HttpCacheReadBehavior::NoCache);
const winrt::Windows::Web::Http::HttpClient client(filter);
const auto response = client.GetAsync(winrt::Windows::Foundation::Uri(url)).get();
response.EnsureSuccessStatusCode();