curl-library
Re: ftp parse remote filesize from header
From: Jonas Schnelli <jonas.schnelli_at_include7.ch>
Date: Wed, 19 Oct 2011 22:10:43 +0200
Date: Wed, 19 Oct 2011 22:10:43 +0200
> 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.
Aha. Sound good. I'll give that a try.
Thanks Dan!
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-19