summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-19 13:58:01 -0400
committerCMake Topic Stage <kwrobot@kitware.com>2012-09-19 13:58:01 -0400
commit03077c9cbc587b548e4ccf91493acb015c40de03 (patch)
tree753443f4f55ee5ddb68ac0f9d330c631899ea943 /Source
parentfbe7b3cdfcbf890f50e1d5ef42311d7ff6020990 (diff)
parent14aff4daf45a3cf0af59de60a464af9abe6a013c (diff)
downloadcmake-03077c9cbc587b548e4ccf91493acb015c40de03.tar.gz
Merge topic 'file-DOWNLOAD-user-agent'
14aff4d file(DOWNLOAD): Add HTTP User-Agent string
Diffstat (limited to 'Source')
-rw-r--r--Source/cmFileCommand.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4d9eb79726..2bc4290089 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2855,6 +2855,9 @@ cmFileCommand::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);
+ check_curl_result(res, "DOWNLOAD cannot set user agent option: ");
+
res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
cmWriteToFileCallback);
check_curl_result(res, "DOWNLOAD cannot set write function: ");