diff options
author | Brad King <brad.king@kitware.com> | 2012-09-19 13:58:01 -0400 |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-09-19 13:58:01 -0400 |
commit | 03077c9cbc587b548e4ccf91493acb015c40de03 (patch) | |
tree | 753443f4f55ee5ddb68ac0f9d330c631899ea943 /Source | |
parent | fbe7b3cdfcbf890f50e1d5ef42311d7ff6020990 (diff) | |
parent | 14aff4daf45a3cf0af59de60a464af9abe6a013c (diff) | |
download | cmake-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.cxx | 3 |
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: "); |