summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-09-19 17:58:01 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-09-19 17:58:01 (GMT)
commit03077c9cbc587b548e4ccf91493acb015c40de03 (patch)
tree753443f4f55ee5ddb68ac0f9d330c631899ea943 /Source/cmFileCommand.cxx
parentfbe7b3cdfcbf890f50e1d5ef42311d7ff6020990 (diff)
parent14aff4daf45a3cf0af59de60a464af9abe6a013c (diff)
downloadCMake-03077c9cbc587b548e4ccf91493acb015c40de03.zip
CMake-03077c9cbc587b548e4ccf91493acb015c40de03.tar.gz
CMake-03077c9cbc587b548e4ccf91493acb015c40de03.tar.bz2
Merge topic 'file-DOWNLOAD-user-agent'
14aff4d file(DOWNLOAD): Add HTTP User-Agent string
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 4d9eb79..2bc4290 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: ");