Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
When downloading multiple files in a row without resetting the CURL options and limiting download speed using CURLOPT_MAX_RECV_SPEED_LARGE, only the first file downloaded will be rate-limited. Subsequent files will download as fast as possible.
After checking this on a few versions, doing some printf debugging, and scanning through recent pull requests, it seems to be the issue was introduced in 7.60 with this commit.
If I add
Problem also exists when using CURLOPT_MAX_SEND_SPEED_LARGE in the same way.
I noticed it on version 7.64.1, then tested it on a few other versions. On 7.59 it worked properly and on 7.60 it did not.
The file I'm downloading is 226KB, so I would expect it to take about six seconds at 37KB/sec.
You can also extend the loop around the calls to set the options; it's the same result.