cURL / Mailing Lists / curl-library / Single Mail


Re: ftp parse remote filesize from header

From: Jonas Schnelli <>
Date: Wed, 19 Oct 2011 20:56:09 +0200

> On Wed, Oct 19, 2011 at 04:34:34PM +0200, Jonas Schnelli wrote:
>> Just to be sure and check other alternatives:
>> When getting only the header while loading a FTP file (CURLOPT_NOBODY = 1, CURLOPT_HEADER = 1), do i have to parse the header output?
>> Is the output generated by curl and will it be always the same (different servers)?
>> Or is there a more easy option to load the remote filesize / check if file exists on ftp/sftp?
> You can use curl_easy_getinfo to get the file size after the transfer
> without having to parse any headers yourself.

Okay. But i'd like to check the filesize >before< i load the file.
Any other chances?


List admin:
Received on 2011-10-19