reviews changes

This commit is contained in:
Christophe Fajardo 2022-01-24 21:33:26 +01:00
commit 8e1b718d7f
4 changed files with 12 additions and 14 deletions

View file

@ -766,11 +766,11 @@ void appasset(resp_https_t response, req_https_t request) {
print_req<SimpleWeb::HTTPS>(request);
auto args = request->parse_query_string();
auto [ app_image, image_content_type ] = proc::proc.get_app_image(util::from_view(args.at("appid")));
auto app_image = proc::proc.get_app_image(util::from_view(args.at("appid")));
std::ifstream in(app_image, std::ios::binary);
SimpleWeb::CaseInsensitiveMultimap headers;
headers.emplace("Content-Type", "image/" + image_content_type);
headers.emplace("Content-Type", "image/png");
response->write(SimpleWeb::StatusCode::success_ok, in, headers);
response->close_connection_after_response = true;
}