cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Re-init curl handle needed on errors?

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 12 Nov 2001 16:33:43 +0100 (MET)

On Mon, 12 Nov 2001, Cadime wrote:

(CC'ing this back to the list again.)

[when doing the second fetch]

> URL: ftp://10.70.22.9/alarmes/
> * Re-using existing connection! (#0)
> * Connected to 10.70.22.9 (10.70.22.9)
> > CWD /
> < 226 Transfer complete.
> Comando FTP executado

[snip]

> When I curl_easy_init() the handle after the CURLE_FTP_COULDNT_RETR_FILE
> error, all seems to work fine!!!!

Yes, but then you don't re-use your existing connection.

This is an error in the library all right. As can be seen above, when you try
to do the second request, you first get the reply back from the previous
request ("226 Transfer complete") instead of the reply for the "CWD" command
as it was expecting.

This needs to be fixed in the library. I'll have a look at it tonight or
tomorrow.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
Received on 2001-11-12