cURL / Mailing Lists / curl-library / Single Mail



From: codemastr <>
Date: Sat, 11 Oct 2003 16:08:37 -0400

I think I got this working, though I'm wondering if I missed something
seeing as how it seemed rather easy, and I would have thought someone would
have already done this... Anyway, since it is for file size limiting, I
figured that means it only makes sense for HTTP/FTP, so for HTTP it just
checks the result of the Content-Length and stops if it is too large, and
for FTP it checks the SIZE result. I also added for curl a --max-filesize
option to allow it to use this feature and it seems that it works perfectly
(note though that I haven't tested through an HTTP proxy since I don't have
access to any). Also, I didn't update the man pages or anything because I
wasn't sure exactly how the curl helpfiles work since there seems to be some
perl utilities to handle it so below is a brief description.

This allows you to specify the maximum size (in bytes) of a file to
download. If the file requested is larger than this value, the transfer will
terminate and CURLE_FILESIZE_EXCEEDED will be returned.

The attached patch was made against the current CVS version of curl.

Dominick Meglio

This email is sponsored by: Giveback Program. hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here:

Received on 2003-10-11