cURL / Mailing Lists / curl-library / Single Mail


Re: ftp parse remote filesize from header

From: Dan Fandrich <>
Date: Wed, 19 Oct 2011 13:05:04 -0700

On Wed, Oct 19, 2011 at 08:56:09PM +0200, Jonas Schnelli wrote:
> Okay. But i'd like to check the filesize >before< i load the file.
> Any other chances?

If you set the CURLOPT_NOBODY option, then libcurl won't download the file.
You still need to call curl_easy_perform to get the size, but it will be
a quick operation and the connection will stay open to do the subsequent
download (with another curl_easy_perform call) with little latency.

>>> Dan
List admin:
Received on 2011-10-19