cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Limit bytes transfered in cURL request...

From: Dave Reisner <d_at_falconindy.com>
Date: Mon, 2 Jul 2012 14:08:51 -0400

On Mon, Jul 02, 2012 at 12:00:40PM -0400, Russ Jones wrote:
> Is there an option to limit the number of bytes, perhaps to 200KB when
> downloading a file using cURL?
>
> Thanks,
>
> Russ
>
> --
> ============================
> Russ Jones, CTO
> rjones_at_virante.com
>
> Virante Inc.
> 101 J. Morris Commons Lane – Suite 105
> Morrisville, NC 27560
>
> P: 919-459-1035
> F: 919-747-4362
>
>

> -------------------------------------------------------------------
> List admin: http://cool.haxx.se/list/listinfo/curl-users
> FAQ: http://curl.haxx.se/docs/faq.html
> Etiquette: http://curl.haxx.se/mail/etiquette.html

Sure, the manpage details this option:

  --max-filesize <bytes>
        Specify the maximum size (in bytes) of a file to download. If
        the file requested is larger than this value, the transfer will
        not start and curl will return with exit code 63.

dave
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-02