curl-users
Reg proxy authentication random error in Windows OS
Date: Wed, 22 May 2013 00:00:19 +0800 (SGT)
I am using libcurl to do HTTP request. My application is running in Windows and I have to send some requests to the server. I am able to communicate with the server without any issues when there are no proxy involved.
However issue arised when I have to go through proxyserver which mandates authentication. I am getting “Authorization Required: 407” randomly. At times it goes through and connects but at time it fails.
I explored the options in libcurl but i could not able to make it work.
Below are my settings with regards to proxy I have tried
curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXY, <proxy-server>);
curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXYPORT, <port number>);
//curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
OR curlResultCode = curl_easy_setopt(curlHandle, CURLOPT_PROXYAUTH, CURLAUTH_NTLM);
I have tried both ANY and NTLM. At times i am getting "Authentication required: 407" during the easy perform.
I need some help in understanding what I have dones wrong here and to resolve the random behavior.
I assume I do not need to supply user name and password as I assume curl will be able to retrieve during the transfer (as it worked in some cases)
Sincerely,
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-05-21