Add extension to futurefile

This commit is contained in:
Sebastian Piwell
2016-04-22 17:39:45 -04:00
parent 0a56f7ed44
commit f6bbce8b4c
6 changed files with 61 additions and 30 deletions
+9
View File
@@ -229,6 +229,15 @@ std::shared_ptr<DownloadManager::FileFuture> DownloadManager::downloadToMemory(
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0L);
CURLcode res = curl_easy_perform(curl);
if(res == CURLE_OK){
// ask for the content-type
char *ct;
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
if(ct){
future->extension = std::string(ct);
}
}
curl_easy_cleanup(curl);
if (res == CURLE_OK)