cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: FTP SIZE Command

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Thu, 30 Sep 2004 22:20:26 +0200 (CEST)

On Thu, 30 Sep 2004, Wei Weng wrote:

> AFAIK, the "SIZE" command is not standardized. Check RFC 959 for a list of
> standard FTP command. (http://www.zvon.org/tmRFC/RFC959/Output/index.html)

That's correct. But most FTP servers in use today support it.

> However, a even more clumsy way is to use "LIST" command then use ftpparse
> utility (http://cr.yp.to/ftpparse.html), try to extract the file size
> information, and pray that the format the FTP server returns is not too
> strange not to be recognized. :)

Also, most FTP servers provide the size of the upcoming transfer in the
150-response to RETR, and libcurl attempts to figure out the size from that if
the SIZE command didn't work.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-09-30