cURL / Mailing Lists / curl-library / Single Mail

curl-library

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

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Thu, 4 Nov 2010 20:49:05 +0100

On Thursday 04 November 2010 18:57:01 Number Cruncher wrote:
> Good point. I don't think you can tell the difference. I suppose you
> could keep receiving data *until* you received a 225 or 226 and then
> check if you've actually received the whole file. If so, expect a 225
> (No transfer to ABOR).

Anaconda does _not_ want to receive the whole file. If it did, we would not
face this problem at all. The only question is if we know how to download
a partial file through FTP somehow efficiently, while still reliably enough
across various implementations of FTP servers. Otherwise it is easy to
download the file till the end and ignore its suffix at the application
level.

> 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?

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