cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: [PATCH] ftp: prevent server from hanging on closed data connection

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 4 Nov 2010 21:44:11 +0100 (CET)

On Thu, 4 Nov 2010, Kamil Dudka wrote:

>> Alternatively, just drop the whole session and reconnect later....
>
> That is probably the safest solution as there is IMO no FTP code that
> reliably confirms the success of ABOR. However it may be still better than
> downloading the whole file as long as the skipped part is reasonably large.
> Does it still make sense to send ABOR prior to closing both connections?

Yes and no.

Yes: The original bug report was about a server getting "stuck" if we didn't
send ABOR, so theoretically it still hangs on the connection if we just close
it. So sending ABOR is the nice thing to do to the server.

No: That occasional hang will not bother us somce we just proceed and close
down the entire thing anyway without trying to read anything further from the
command connection.

As we now send ABOR my only concern is if there's another case that we haven't
yet thought of or ran into that makes sending it a bad idea, as otherwise I
think sending it makes sense.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-11-04