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  2f4df3a7917a16740613e4310a7d41c81a3fbd37 (commit)
       via  9dd07fd8eb789f2cdf19b7afce375f55795ddab2 (commit)
      from  12ef1e870566649c81392428de48275f39e73b23 (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=2f4df3a7917a16740613e4310a7d41c81a3fbd37
commit 2f4df3a7917a16740613e4310a7d41c81a3fbd37
Merge: 12ef1e8 9dd07fd
Author:     Brad King <[email protected]>
AuthorDate: Mon Sep 19 17:29:50 2011 -0400
Commit:     CMake Topic Stage <[email protected]>
CommitDate: Mon Sep 19 17:29:50 2011 -0400

    Merge topic 'file-download-http-error' into next
    
    9dd07fd Make file(DOWNLOAD) fail on http error


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9dd07fd8eb789f2cdf19b7afce375f55795ddab2
commit 9dd07fd8eb789f2cdf19b7afce375f55795ddab2
Author:     Brad King <[email protected]>
AuthorDate: Mon Sep 19 14:50:47 2011 -0400
Commit:     Brad King <[email protected]>
CommitDate: Mon Sep 19 17:28:55 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..15ebc60 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2753,6 +2753,9 @@ 
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);
+
   res = ::curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
                            cmWriteToFileCallback);
   check_curl_result(res, "DOWNLOAD cannot set write function: ");

-----------------------------------------------------------------------

Summary of changes:
 Source/cmFileCommand.cxx |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits

Reply via email to