Skip to content

Commit

Permalink
Fix downloader selection (#4696)
Browse files Browse the repository at this point in the history
  • Loading branch information
florelis authored Jul 31, 2024
1 parent 6df6ded commit f6e27a4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/allow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ appxsdk
APSTUDIO
ARRAYSIZE
artifactstagingdirectory
Asn
aspirational
Authenticode
AUTOLISTEN
Expand Down
10 changes: 7 additions & 3 deletions src/AppInstallerCommonCore/NetworkSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,21 @@ namespace AppInstaller::Settings
InstallerDownloader NetworkSettings::GetInstallerDownloader() const
{
// The default is DeliveryOptimization.
// We only use WinINet if specified by settings, or if we want to use proxy (as DO does not support that)
// We use WinINet if specified by settings, or if we want to use proxy (as DO does not support that)
InstallerDownloader setting = User().Get<Setting::NetworkDownloader>();

if (setting != InstallerDownloader::WinInet && m_proxyUri)
if (m_proxyUri && setting != InstallerDownloader::WinInet)
{
AICLI_LOG(Core, Info, << "Forcing use of wininet for download as DO does not support proxy");
return InstallerDownloader::WinInet;
}
else // Default or DO
else if (setting == InstallerDownloader::Default)
{
return InstallerDownloader::DeliveryOptimization;
}
else
{
return setting;
}
}

Expand Down

0 comments on commit f6e27a4

Please sign in to comment.