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