mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 13:51:33 -06:00
Merge topic 'macos-curl-user-agent' into release-3.30
1a74f95656 file(DOWNLOAD): Fix User-Agent to use run-time curl version
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9726
This commit is contained in:
@@ -2131,7 +2131,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);
|
||||
|
||||
Reference in New Issue
Block a user