winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fd3597da06a74dcb444b9814515242577bf9d174
parent 646d8793b6e63865f9de8832a809c8891d64e6a0
Author: JohnMcPMS <johnmcp@microsoft.com>
Date:   Tue, 26 Sep 2023 19:43:11 -0700

Try harder... (#3680)


Diffstat:
Msrc/AppInstallerCommonCore/Downloader.cpp | 2+-
Msrc/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp | 13++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/AppInstallerCommonCore/Downloader.cpp b/src/AppInstallerCommonCore/Downloader.cpp @@ -168,7 +168,7 @@ namespace AppInstaller::Utility for (const auto& header : response.Headers()) { - result.emplace(Utility::ConvertToUTF8(header.Key()), Utility::ConvertToUTF8(header.Value())); + result.emplace(Utility::FoldCase(static_cast<std::string_view>(Utility::ConvertToUTF8(header.Key()))), Utility::ConvertToUTF8(header.Value())); } return result; diff --git a/src/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp b/src/AppInstallerRepositoryCore/Microsoft/PreIndexedPackageSourceFactory.cpp @@ -161,11 +161,22 @@ namespace AppInstaller::Repository::Microsoft AICLI_LOG(Repo, Verbose, << "Header indicates version is: " << itr->second); return { itr->second }; } + + // We did not find the header we were looking for, log the ones we did find + AICLI_LOG(Repo, Verbose, << "Did not find " << s_PreIndexedPackageSourceFactory_PackageVersionHeader << " in:\n" << [&]() + { + std::ostringstream headerLog; + for (const auto& header : headers) + { + headerLog << " " << header.first << " : " << header.second << '\n'; + } + return std::move(headerLog).str(); + }()); } CATCH_LOG(); } - AICLI_LOG(Repo, Verbose, << "No version header, falling back to reading the package data"); + AICLI_LOG(Repo, Verbose, << "Falling back to reading the package data"); Msix::MsixInfo info{ packageLocation }; auto manifest = info.GetAppPackageManifests();