lib: let the max filesize option stop too big transfers too

Previously it would only stop them from getting started if the size is
known to be too big then.

Update the libcurl and curl docs accordingly.

Fixes #11810
Reported-by: Elliot Killick
Assisted-by: Jay Satiro
Closes #11820
This commit is contained in:
Daniel Stenberg 2023-09-23 11:20:00 +02:00
parent 38029101e2
commit 914e49b9b7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
13 changed files with 55 additions and 15 deletions

View file

@ -18,6 +18,9 @@ A size modifier may be used. For example, Appending 'k' or 'K' counts the
number as kilobytes, 'm' or 'M' makes it megabytes, while 'g' or 'G' makes it
gigabytes. Examples: 200K, 3m and 1G. (Added in 7.58.0)
**NOTE**: The file size is not always known prior to download, and for such
files this option has no effect even if the file transfer ends up being larger
than this given limit.
**NOTE**: before curl 8.4.0, when the file size is not known prior to
download, for such files this option has no effect even if the file transfer
ends up being larger than this given limit.
Starting with curl 8.4.0, this option aborts the transfer if it reaches the
threshold during transfer.

View file

@ -41,6 +41,9 @@ transfers this option has no effect - even if the file transfer eventually
ends up being larger than this given limit.
If you want a limit above 2GB, use \fICURLOPT_MAXFILESIZE_LARGE(3)\fP.
Since 8.4.0, this option also stops ongoing transfers if they reach this
threshold.
.SH DEFAULT
None
.SH PROTOCOLS

View file

@ -40,6 +40,9 @@ returned.
The file size is not always known prior to the download start, and for such
transfers this option has no effect - even if the file transfer eventually
ends up being larger than this given limit.
Since 8.4.0, this option also stops ongoing transfers if they reach this
threshold.
.SH DEFAULT
None
.SH PROTOCOLS