cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: conn->proto.ftp == NULL in Curl_ftp_done

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 16 Sep 2006 23:04:33 +0200 (CEST)

On Sat, 16 Sep 2006, Armel Asselin wrote:

> When the easy handle is removed from the multi while libcurl is still trying
> to resolve the name of the proxy, it seems that the ftp struct is not yet
> initialized at that time(?)... but the removal action calls Curl_done stuff,
> hence the crash.

Thank you very much for the details and for your work. I've now committed a
fix with a large comment basically saying what you explained above.

> BTW, can I use a URL such as "http://armel:pwd@192.168.1.101:3128" as a
> proxy specification (into CURLOPT_PROXY)?

Yes, AFAICR that is supposed to work.

> because my problems come when 'pwd' is missing (leaving "armel:@", it seems
> that libcurl then tryies to resolve 'armel' as server and '@192...' as port
> or something like that)

Sounds like a bug, but test case 264 actually verifies that this works, and it
runs fine for me.

> would "socks://..." work as well? (or socks4 / socks5?)

The proxy host name parser doesn't care about the protocol prefix used, you
need to set the type with CURLOPT_PROXYTYPE. But it should get the proxy user
name and password for them nonetheless.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-09-16