cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patch to enhance max-filesize

From: codemastr <codemstr_at_ptd.net>
Date: Sat, 27 Dec 2003 13:13:11 -0500

----- Original Message -----
From: "Craig Markwardt" <craigm_at_cow.physics.wisc.edu>
To: <curl-library_at_lists.sourceforge.net>
Sent: Wednesday, December 24, 2003 6:57 PM
Subject: Patch to enhance max-filesize

>
> Greetings--
>
> Here is a patch that builds on Dominick Meglio's --max-filesize patch
> from October. It implements a maximum file size even for those
> servers which don't report a file size in their HTTP header or FTP
> SIZE command. The idea is to prevent someone malicious or inadvertant
> from serving a huge file, which might ultimately deny net or disk
> resources.
I was going to do this, but then I thought, should it really be done like
this? I doubt it is what the user wants. My thoughts are that the user
doesn't want to set a max file size of 100MB, download 100MB, then after
sitting there for an hour (or maybe even a whole day if it is 56k) while
that downloads, have curl stop because it just now discovered the file to be
101MB. I know I certainly would not want that. I personally don't think such
a feature should be incorporated, and definately not as part of the current
CURLOPT_MAXFILESIZE, because I really don't think this is what the user
expects when enabling that option.

Dominick Meglio

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-27