cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: keeping connection on multi_remove_handle for FTP

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Mon, 4 Dec 2006 10:25:15 +0100

[I still use curl - 7.15.6 as of cvs head 2006/08/21]

In fact I'm on another problem, the removal of a curl handle from a multi is understood as being a removal '_after_ success or error'... as such the Curl_ftp_done function expects to have stuff either in error or in good state. but in the case of a 'cancel' which may happen at any time, the transfer is both in success and in a fairly transient state so that Curl_ftp_done _hangs_ one minute before going on.

any idea? could we have something to tell "please cancel this operation"? (on option for example which notes that on Curl_???_done libcurl should trash everything as fast a possible). this option would be set after the CURL* was added to the multi (in fact, on cancelation, just before the removal from multi handle)

Regards
Armel
  ----- Original Message -----
  From: Armel Asselin
  To: libcurl development
  Sent: Sunday, December 03, 2006 11:32 AM
  Subject: keeping connection on multi_remove_handle for FTP

  Hello all,

  some times ago, I proposed to develop the following behaviour: when a easy handle for a FTP connection is removed from a multi, it should be canceled nicely so that the (control) connection to the server is kept (avoiding full renogatiation of user/pwd/account/encryption level/ssl).

  my basic idea would be to put a flag on the control connection such as "want_abort" but do not close it. if it is actually reused, the abort command would be first sent, on irremediable failure, the connection could be restarted as if not reused. one other solution would be to just send the command at ABOR (without waiting for the reply at cancel time, but reading the reply at re-use time, if any, so have a "abort_sent" flag in the connection).

  does it seem OK?

  Regards
  Armel Asselin

  ---------------------------------------------------------------------------------------
  Orange vous informe que cet e-mail a été contrôlé par l'anti-virus mail.
  Aucun virus connu à ce jour par nos services n'a été détecté.
Received on 2006-12-04