Fix HTTP content type for appassets
This commit is contained in:
committed by
GitHub
parent
2bcb713b82
commit
83da80f631
+1
-1
@@ -770,7 +770,7 @@ void appasset(resp_https_t response, req_https_t request) {
|
|||||||
|
|
||||||
std::ifstream in(app_image, std::ios::binary);
|
std::ifstream in(app_image, std::ios::binary);
|
||||||
SimpleWeb::CaseInsensitiveMultimap headers;
|
SimpleWeb::CaseInsensitiveMultimap headers;
|
||||||
headers.emplace("Content-Type", image_content_type);
|
headers.emplace("Content-Type", "image/" + image_content_type);
|
||||||
response->write(SimpleWeb::StatusCode::success_ok, in, headers);
|
response->write(SimpleWeb::StatusCode::success_ok, in, headers);
|
||||||
response->close_connection_after_response = true;
|
response->close_connection_after_response = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user