summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-16 17:45:24 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-01-16 17:45:24 (GMT)
commit5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7 (patch)
tree5642e9fe84edd3aa1b89f5c81c7e8691b9b51bac
parentf519f149722dce667555dd28f4510f865a485cef (diff)
downloadCMake-5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7.zip
CMake-5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7.tar.gz
CMake-5dfa7ed590577e15b47bbbc11d3c15d5e722f3c7.tar.bz2
Add proxy support for triggering
-rw-r--r--Source/CTest/cmCTestSubmit.cxx19
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);
}