Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting CURLOPT_INFILESIZE to -1 leads to error #2047

voitsik opened this issue Nov 3, 2017 · 1 comment

Setting CURLOPT_INFILESIZE to -1 leads to error #2047

voitsik opened this issue Nov 3, 2017 · 1 comment


Copy link

voitsik commented Nov 3, 2017

I did this

Call the following function:
curl_easy_setopt(curl, CURLOPT_INFILESIZE, (long)-1);
The man page explicitly states that the third argument of the function (filesize) may be set to '-1'.

I expected the following

Get return value CURLE_OK.

instead got the following


curl/libcurl version

curl 7.56.1 (x86_64-pc-linux-gnu) libcurl/7.56.1 OpenSSL/1.0.2l zlib/1.2.11
Release-Date: 2017-10-23
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL libz TLS-SRP UnixSockets HTTPS-proxy

operating system

Gentoo Base System release 2.4.1


Previous version of curl (7.56.0) does not have this problem.

The problem was originally identified when using curlftpfs. After upgrading the system installation of curl to 7.56.1 it became impossible to upload files to FTP servers mounted via curlftpfs.

@bagder bagder closed this as completed in 921bf1d Nov 3, 2017
Copy link

bagder commented Nov 3, 2017

Thank you, fixed in git now!

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

No branches or pull requests

2 participants