Cant set proxy if it does not have a password. I have changed your code to
this, I believe you should update it too:
void twitCurl::prepareCurlProxy()
{
if( !m_curlProxyParamsSet)
{
/* Reset existing proxy details in cURL */
curl_easy_setopt( m_curlHandle, CURLOPT_PROXY, NULL );
curl_easy_setopt( m_curlHandle, CURLOPT_PROXYUSERPWD, NULL
);
curl_easy_setopt( m_curlHandle, CURLOPT_PROXYAUTH,
(long)CURLAUTH_ANY );
/* Prepare username and password for proxy server */
std::string proxyIpPort( "" );
utilMakeCurlParams( proxyIpPort, getProxyServerIp(),
getProxyServerPort() );
curl_easy_setopt( m_curlHandle, CURLOPT_PROXY,
proxyIpPort.c_str() );
/* Proxy username and password */
if( m_proxyUserName.length() && m_proxyPassword.length() )
{
std::string proxyUserPass( "" );
utilMakeCurlParams( proxyUserPass,
getProxyUserName(), getProxyPassword() );
curl_easy_setopt( m_curlHandle,
CURLOPT_PROXYUSERPWD, proxyUserPass.c_str() );
}
/* Set the flag to true indicating that proxy info is set
in cURL */
m_curlProxyParamsSet = true;
}
}
Original issue reported on code.google.com by jbalodi...@gmail.com on 19 Jan 2010 at 6:38
Original issue reported on code.google.com by
jbalodi...@gmail.com
on 19 Jan 2010 at 6:38