curl-library
Re: Proxy not resolved
Date: Sat, 30 Aug 2003 16:45:59 -0400
If the code below is an exact copy of what you're using, perhaps you could
try changing CURLOPT_PROXY to CURLOPT_PROXYPORT on the line where you set
the port to 8080.
Lars Nilsson
Quantum Chamaeleon
http://www.quantumchamaeleon.com
----- Original Message -----
From: "Matt Veenstra" <matt_at_tribeworks.com>
To: "curl" <curl-library_at_lists.sourceforge.net>
Sent: Saturday, August 30, 2003 4:16 PM
Subject: Proxy not resolved
Hello guys,
I am having problems with the proxy being resolved my code is below.
I am not set up with a proxy myself so it is harder for me to debug. Just
was curious if anyone sees something wrong with this code.
All values of host and port are proper but I get error.
CURLE_COULDNT_RESOLVE_PROXY
This is in the 7.7.2 which is included on Mac OS X, but command line works
just fine so I don't think this is the problem.
So in the command line this works...
curl -xproxy.mystarhub.net.sg:8080
http://www.tribeworks.com/Images/product_menu/images/support_03.jpg
-otribeworks.jpg
With libcurl the below does not work. without a proxy the code works great.
Do I need to use the multi interface?
///////////////////////////////////////////////
curl = curl_easy_init();
if (curl) {
curl_easy_setopt(curl, CURLOPT_PROXY, ³proxy.mystarhub.net.sg²);
curl_easy_setopt(curl, CURLOPT_PROXY, 8080);
curl_easy_setopt(curl, CURLOPT_URL, (char *)url);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
curl_easy_setopt(curl, CURLOPT_FILE, &filedata);
curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
// If a proxy is defined and it is a bad proxy setting we crash in
strlen of strdup with bad access
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
///////////////////////////////////////////////
Thanks,
Matt
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-08-30