cURL / Mailing Lists / curl-library / Single Mail

curl-library

Converting blocking parts in establishing active FTP connection

From: Gokhan Sengun <gokhansengun_at_gmail.com>
Date: Thu, 15 Dec 2011 16:38:30 +0200

Hello folks,

I started to convert blocking part in establishing active FTP data
connection to non-blocking a week ago but somethings urgent came into place
and I paused.

Now I am back on it but have a few questions regarding the implementation.

1- I plan to introduce another timeout in addition to TRANSFER timeout and
CONNECT timeout. It could be called ACCEPT_TIMEOUT and meaningful only for
active FTP data connections. When server says 150 but then says nothing
(like 421, 425 or 426), we may wait this timeout and then fail with
ACCEPT_TIMEOUT error. This means we have to introduce another error like
CURLE_ACCEPT_TIMEOUT

2- I tried to run the tests 591 through 594. Some tests still fails because
of the expected return code and some fails because they expect QUIT command
be sent even if timeout occurs. These are different subjects, I will ask
specific questions later. What I would like to ask now is: what should be
the error code in following situation:

server sends 150 afterwards sends 4xx meaning it was not able to connect to
the client because of an internal error. In this case what error code
should be used? A new error code like CURLE_SERVER_FAILED_TO_CONNECT orr
CURLE_FTP_COULDNT_RETR_FILE or CURLE_FTP_COULDNT_STOR_FILE.

Thanks

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-12-15