% curl -V
curl 7.9 (i686-pc-linux-gnu) libcurl 7.9 (ipv6 enabled)
In transfer.c,function Transfer():
urg = Curl_speedcheck(data,now)
If the speedcheck fails (ie.: the operation is too
slow), it returns CURLE_OPERATION_TIMEOUTED, and this
goes up to Transfer(), then to Curl_Perform(), finnaly
The problem (i think) is that conn->bytecountp is not
set in this case.
That is a real problem because if you give a
CURLOPT_FILE to libcurl, then curl_easy_perform already
wrote to that file, and there is no (clean) way to know
how many bytes it wrote.
By the way, i think that *maybe* it should return
CURLE_PARTIAL_FILE if the connection gets to slow.
I'm using curl as part of my PhD thesis in computer
science, i'm in the early stages experimenting with
scheduling policies with a web crawler. I found this
misbehavior because in web crawlers it's very important
to reschedule web pages if they get too slow, because
web servers have a rather high variance in service time.
I first wanted to use libwww but stupidly it's not
MTsafe. Then i found curl and think it's great. Thanks you.