uploading with curl

Gleb s4mmael at gmail.com
Thu Apr 19 00:26:42 PDT 2012


Jonas, thanks for your answer.

On Tuesday, 17 April 2012 at 20:03:57 UTC, Jonas Drewsen wrote:
> This is one of the many reasons I believe we should do our own
> network library. Curl only support timeouts for connecting and
> for the entire transfer. What you really want is better control
> with sane defaults: DNS lookup timeout, connect timeout,
> read/write activity timeout and timout for the entire operation.
>
> Default "entire operation" timeout should be infinity and the
> rest just some qualified guesses.
>
> Anyway... I think the current default timeouts are how they
> should be.
There are DNS timeout and connect timeout in current 
std.net.curl. The entire operation timeout is infinity means 
there is no such timeout - this is what curl library offers.
There is also some kind of read/write activity "timeout" in the 
library because the connection will be dropped if ftp-server 
shutdowns suddenly during uploading. That's why I don't see why 
we have to have the data connection timeout which does not allow 
the big files to be downloaded or uploaded.

> Regarding the 10 week limit you're mentioning please see the 
> docs
> for the Duration type:
> http://dlang.org/phobos/core_time.html#Duration
Thank's for the link! I've read it twice but unfortunately the 
reason of 10 weeks limit is still not clear for me. Moreover I 
can't understand why would dataTimeout influences connectTimeout 
in such way if the value I use is more then 10 weeks.

> What you're describing sounds like a bug and I'll have a look at
> it.
Thank you very much! Your contribution to D's curl library 
support is outstanding.


More information about the Digitalmars-d mailing list