std.net.curl: Bad timeout defaults

Jonas Drewsen jdrewsen at nospam.com
Fri Sep 14 06:54:39 PDT 2012


On Friday, 14 September 2012 at 13:31:50 UTC, Johannes Pfau wrote:
> I've been using std.net.curl lately and there's a small issue 
> with the
> default timeouts:
>
> dataTimeout is documented as:
> /// Set timeout for activity on connection.
>
> but this is not true! timeout_ms actually is "the maximum time 
> that you
> allow the libcurl transfer operation to take". This timeout is 
> enforced
> even if there is activity. So we currently limit all CURL 
> operations to
> 2 Minutes (default limit), which sucks for download managers 
> and other
> long-running operations.
>
> We should probably use CURLOPT_LOW_SPEED_LIMIT and
> CURLOPT_LOW_SPEED_TIME instead. Any comments?

This is indeed not good and the comments should be corrected. 
CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME seems to be 
good candidates for an extra option.

Jonas



More information about the Digitalmars-d mailing list