0

I found out today that the current version of curl has a weird connection timeout behavior. I found a record of the behavior dated back to at least 2014. The behavior I am referring to is how curl allocates connection timeout.

When I set --connection-timeout option, I would expect it to apply the timeout to each server, but curl instead allocate the timeout reverse-exponentially. So if you set the timeout to 3 seconds, the first server gets 1.5s budget, the second one gets 750ms, the third 375ms, and so on. You can read the rationale by the author himself here.

I wonder if there is an option to do what I expected, setting connection timeouts for each server.
It doesn't need to be an option for curl itself; I will be happy if I can do that in libcurl.
Either curl or libcurl would do.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.