curl-library
RE: Feature Request - Max Download File size
Date: Mon, 10 Jun 2002 07:10:32 -0700
Hi,
Well, the feature is to avoid transferring anything unless required. In the
case of my software, it needs to have a maximum limit to avoid downloading
files beyond that. I can also think of a wget like usecase for which
something like this might be useful.
Basically, it is about giving the flexibility to the caller to specify some
conditions under which libcurl will not download the resource. Since there
is no other way for the caller to find this out without downloading the
resource, it is a very useful feature.
Cheers,
Gautam
-----Original Message-----
From: Daniel Stenberg
To: Gautam Mani
Cc: libcurl Mailing list
Sent: 6/10/2002 6:21 AM
Subject: Re: Feature Request - Max Download File size
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=osdntextlinkReceived on 2002-06-10