Pass a long as parameter. This specifies the maximum accepted *size* (in
bytes) of a file to download. If the file requested is found larger than this
value, the transfer is aborted and *CURLE_FILESIZE_EXCEEDED* is returned.
+Passing a zero *size* disables this, and passing a negative *size* yields a
+*CURLE_BAD_FUNCTION_ARGUMENT*.
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
# DEFAULT
-None
+0, meaning disabled.
# EXAMPLE
# RETURN VALUE
-Returns CURLE_OK
+Returns CURLE_OK if the size passed is valid or CURLE_BAD_FUNCTION_ARGUMENT if
+not.
Pass a curl_off_t as parameter. This specifies the maximum accepted *size*
(in bytes) of a file to download. If the file requested is found larger than
this value, the transfer is aborted and *CURLE_FILESIZE_EXCEEDED* is
-returned.
+returned. Passing a zero *size* disables this, and passing a negative *size*
+yields a *CURLE_BAD_FUNCTION_ARGUMENT*.
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
# DEFAULT
-None
+0, meaning disabled.
# EXAMPLE
# RETURN VALUE
-Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
+Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
+CURLE_BAD_FUNCTION_ARGUMENT if the size passed is invalid.