Add proxy support for triggering

This commit is contained in:
Andy Cedilnik 2003-01-16 12:45:24 -05:00
parent f519f14972
commit 5dfa7ed590
1 changed files with 18 additions and 1 deletions

View File

@ -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);
}