[Cmake-commits] CMake branch, next, updated. v2.8.5-1926-g88f70a7
Brad King
brad.king at kitware.com
Mon Sep 19 17:42:07 EDT 2011
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 88f70a7bc02a96b57ea22f7f265dead615518eef (commit)
via 09817e91f9bb03353c49f3c8aa6cb7ad9789fcc7 (commit)
from e6636f4a232a30837ea242942b4eae0bf9b3b7d7 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88f70a7bc02a96b57ea22f7f265dead615518eef
commit 88f70a7bc02a96b57ea22f7f265dead615518eef
Merge: e6636f4 09817e9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 19 17:42:06 2011 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 19 17:42:06 2011 -0400
Merge topic 'file-download-http-error' into next
09817e9 Make file(DOWNLOAD) fail on http error
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=09817e91f9bb03353c49f3c8aa6cb7ad9789fcc7
commit 09817e91f9bb03353c49f3c8aa6cb7ad9789fcc7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 19 14:50:47 2011 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Sep 19 17:41:48 2011 -0400
Make file(DOWNLOAD) fail on http error
If a http server responds with a result code greater than 400 then the
data returned from the download probably do not match that expected.
Teach file(DOWNLOAD) to fail with an error in this case instead of
silently pretending that the download worked. The file(UPLOAD) command
already does this.
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 3b63906..f933666 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2753,6 +2753,10 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string> const& args)
::CURLcode res = ::curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
check_curl_result(res, "DOWNLOAD cannot set url: ");
+ // enable HTTP ERROR parsing
+ res = ::curl_easy_setopt(curl, CURLOPT_FAILONERROR, 1);
+ check_curl_result(res, "DOWNLOAD cannot set http failure option: ");
+
res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
cmWriteToFileCallback);
check_curl_result(res, "DOWNLOAD cannot set write function: ");
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list