[Cmake-commits] CMake branch, next, updated. v2.8.1-1305-g78ae787
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Jun 4 14:10:50 EDT 2010
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 78ae787e933f295a65875b6a594b57f46a33333f (commit)
via ef491f78218e255339278656bf6dc26073fef264 (commit)
from 3d1e82ab02f57323f4414ec8d9d4ecd14d5a28a3 (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=78ae787e933f295a65875b6a594b57f46a33333f
commit 78ae787e933f295a65875b6a594b57f46a33333f
Merge: 3d1e82a ef491f7
Author: David Cole <david.cole at kitware.com>
Date: Fri Jun 4 14:09:58 2010 -0400
Merge branch 'improve-file-download' into next
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ef491f78218e255339278656bf6dc26073fef264
commit ef491f78218e255339278656bf6dc26073fef264
Author: David Cole <david.cole at kitware.com>
Date: Fri Jun 4 13:38:07 2010 -0400
Allow redirects: set CURLOPT_FOLLOWLOCATION to 1
Enable file(DOWNLOAD ...) to follow redirects. Thanks to
Michael Wild for requesting the addition and providing
the majority of the patch.
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 8260cc7..d06014c 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2763,6 +2763,15 @@ cmFileCommand::HandleDownloadCommand(std::vector<std::string>
return false;
}
+ res = ::curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
+ if (res != CURLE_OK)
+ {
+ std::string errstring = "FILE(DOWNLOAD ) error; cannot set follow-redirect option: ";
+ errstring += ::curl_easy_strerror(res);
+ this->SetError(errstring.c_str());
+ return false;
+ }
+
if(verboseLog.size())
{
res = ::curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
-----------------------------------------------------------------------
Summary of changes:
Source/cmFileCommand.cxx | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list