cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: --max-filesize and streams

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 7 Sep 2005 18:12:51 +0200 (CEST)

On Wed, 7 Sep 2005, Dave wrote:

> curl.exe --url http://wamu.ic.llnwd.net/stream/wamu_wamu -o
> "d:\News\NewsShow.mp3 --max-filesize 12500000 -A 'WinampMPEG/5.0' --retry 32
> --retry-max-time 10
>
> It works fairly well but the max-filesize option does not work. From reading
> the manual it looks like it is checking for a file size before it begins
> downloading.

Yes, the purpose of that option is to not download a single byte if the remote
file is bigger than the given limit.

> Since this is a stream, and there is no file size, it just keeps downloading
> and never stops. Is there a way to get it to just download the file until
> the file reaches max-filesize and then have it quit?
>
> I read through the manual didnt find it. But maybe the manual is not totally
> up to date so I thought I would ask.

I figure you should get a range, like:

         curl --range 0-12500000 [URL]

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-09-07