curl-library
Re: DNS round-robin multi-homed FTP server + EPSV = trouble
Date: Sat, 4 Dec 2004 23:03:55 +0100 (CET)
On Sat, 4 Dec 2004, Richard Atterer wrote:
> 229 Entering Extended Passive Mode (|||53084|)
>
> response. In the case of the 229 response, libcurl will *re-resolve* the
> hostname before making the second connection, which is not a good idea,
Argh. That's indeed a horrible idea!
> I was about to fix this and send a patch, but then started wondering: Is
> there a good reason to re-resolve the hostname? The newhostp variable is
> only there for 229-style responses, and the Curl_resolv() at ftp.c:1601 is
> only given a hostname (and not an IP address) in the case of a 229 response.
...
> so IMHO libcurl's behaviour is buggy.
Correct. It should certainly *not* resolve the host name again. I would very
much appreciate that patch!
Great analysis and work tracking this down!
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-12-04