Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick 3680 into 1.6 #3686

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/AppInstallerCommonCore/Downloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Loading