curl-library
Proxy Authentication
Date: Mon, 5 Jun 2006 00:19:46 -0700 (PDT)
Hi all,
I want to download a file using CUrl. I am using proxy .. without proxy it works fine but if i use proxy then it doesn't . the code is as following ..
unsigned long ulProxyAuthType = 0;
CURLcode CRet = curl_easy_getinfo(m_pCURL,CURLINFO_PROXYAUTH_AVAIL,&ulProxyAuthType);
if ((ulProxyAuthType & CURLAUTH_BASIC) == CURLAUTH_BASIC)
CRet = curl_easy_setopt(m_pCURL, CURLOPT_PROXYAUTH, CURLAUTH_BASIC);
CRet = curl_easy_setopt(m_pCURL, CURLOPT_PROXY, ipadd:port);
CRet = curl_easy_setopt(m_pCURL, CURLOPT_PROXYUSERPWD,proxy_usrname:pswd);
CRet = curl_easy_perform(m_pCURL);
if (CRet != CURLE_OK)
{
// download file code
}
else
{
error
// http state is 407
}
now my question is where is teh problem?? and why execution goes to https state 407 even if i have handled proxy authenticaton..
can ny body guide me on this??
Himanshu P. Purohit
School of Information Technology,
IIT - Khargpur,
West Bengal.
purohitp_at_iitkgp.ac.in
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Received on 2006-06-05