cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Feature Request - Max Download File size

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 10 Jun 2002 15:21:47 +0200 (MET DST)

On Mon, 10 Jun 2002, Gautam Mani wrote:

> Would it be possible to have an option to specify the max file size which
> is permissible to be downloaded through libcurl. Basically we would have
> one more option e.g, CURLOPT_MAXFILESIZE which would accept the max size
> permissible and one more return code CURLE_FILESIZE_EXCEEDED to indicate
> that curl will not honour the request since the file size is more than the
> permissible limit.

Why do you need this? You could easily count the downloaded size using your
callback, and if it reaches your limit you can make your callback return an
error back to the application. Isn't that good enough?

You could set your own custom return code in a struct (passed in from the
application) or something so that you could even make it know that it was
this particular condition occurred.

-- 
    Daniel Stenberg -- curl groks URLs -- http://curl.haxx.se/
_______________________________________________________________
Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink
Received on 2002-06-10