|
|
@@ -2182,7 +2182,10 @@ bool HandleDownloadCommand(std::vector<std::string> const& args,
|
|
|
res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
|
|
|
check_curl_result(res, "DOWNLOAD cannot set http failure option: ");
|
|
|
|
|
|
- res = ::curl_easy_setopt(curl, CURLOPT_USERAGENT, "curl/" LIBCURL_VERSION);
|
|
|
+ curl_version_info_data* cv = curl_version_info(CURLVERSION_FIRST);
|
|
|
+ res = ::curl_easy_setopt(
|
|
|
+ curl, CURLOPT_USERAGENT,
|
|
|
+ cmStrCat("curl/", cv ? cv->version : LIBCURL_VERSION).c_str());
|
|
|
check_curl_result(res, "DOWNLOAD cannot set user agent option: ");
|
|
|
|
|
|
res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cmWriteToFileCallback);
|