cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multihomed connections

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 9 Jun 2004 13:55:09 +0200 (CEST)

On Wed, 9 Jun 2004, Gisle Vanem wrote:

> I've started work on this. But how should CURLOPT_CONNECTTIME be
> interpreted? Max-time on each connection or max-time for all the IP tried?
>
> If I do 'curl -vc2 http://ubr4-ca5-0-sec.landg1.lb.home.nl', this takes
> 47sec for the 7 IPs tried. Much more than 2sec per IP.
>
> Wheras 'curl -vc2 ftp://ubr4-ca5-0-sec.landg1.lb.home.nl' gives up after 1
> sec?!

I think it makes most sense to have CURLOPT_CONNECTTIME affect all IPs tried,
so that -c10 means 10 seconds no matter how many IP addresses the name might
resolve to.

> * Connected to ubr4-ca5-0-sec.landg1.lb.home.nl (82.73.204.1) port 21
> * FTP response reading failed
> * Closing connection #0
> curl: (56) FTP response reading failed
>
> I've spoke about this before; the above is completely untrue. tcpdump shows
> I receive a RST for each of my SYNs. So no way I'm connected. The host has
> no ftp nor http-servers so I'd expect ftp to behave like http connect.

I remember this problem, and as far as I remember it, we haven't found a fix
for this. If the connect code believes it has a good connect to the host, it
will continue to do protocol-specific stuff (which in this case means
attempting to read the FTP server response). The question is why it believes
that it is connected!

-- 
     Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
      Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-06-09