diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-16 17:45:24 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-01-16 17:45:24 (GMT) |
commit | 5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7 (patch) | |
tree | 5642e9fe84edd3aa1b89f5c81c7e8691b9b51bac | |
parent | f519f149722dce667555dd28f4510f865a485cef (diff) | |
download | CMake-5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7.zip CMake-5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7.tar.gz CMake-5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7.tar.bz2 |
Add proxy support for triggering
-rw-r--r-- | Source/CTest/cmCTestSubmit.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestSubmit.cxx b/Source/CTest/cmCTestSubmit.cxx index e7257b9..6fc5f26 100644 --- a/Source/CTest/cmCTestSubmit.cxx +++ b/Source/CTest/cmCTestSubmit.cxx @@ -295,6 +295,23 @@ bool cmCTestSubmit::TriggerUsingHTTP(const std::vector<std::string>& files, curl = curl_easy_init(); if(curl) { + // Using proxy + if ( m_HTTPProxyType > 0 ) + { + curl_easy_setopt(curl, CURLOPT_PROXY, m_HTTPProxy.c_str()); + switch (m_HTTPProxyType) + { + case 2: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4); + break; + case 3: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5); + break; + default: + curl_easy_setopt(curl, CURLOPT_PROXYTYPE, CURLPROXY_HTTP); + } + } + curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); std::string::size_type cc, kk; for ( cc = 0; cc < files.size(); cc ++ ) @@ -319,7 +336,7 @@ bool cmCTestSubmit::TriggerUsingHTTP(const std::vector<std::string>& files, sprintf(hex, "%%%02X", (int)c); ofile.append(hex); break; - break; + break; default: ofile.append(hex); } |