mirror of
https://github.com/curl/curl.git
synced 2026-08-24 15:33:37 +03:00
Dominick Meglio implemented CURLOPT_MAXFILESIZE and --max-filesize.
This commit is contained in:
parent
94568f884d
commit
ce5db9a86e
11 changed files with 60 additions and 7 deletions
|
|
@ -1238,6 +1238,13 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, ...)
|
|||
data->set.http200aliases = va_arg(param, struct curl_slist *);
|
||||
break;
|
||||
|
||||
case CURLOPT_MAXFILESIZE:
|
||||
/*
|
||||
* Set the maximum size of a file to download.
|
||||
*/
|
||||
data->set.max_filesize = va_arg(param, long);
|
||||
break;
|
||||
|
||||
default:
|
||||
/* unknown tag and its companion, just ignore: */
|
||||
return CURLE_FAILED_INIT; /* correct this */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue