cURL / Mailing Lists / curl-library / Single Mail

curl-library

CURLOPT_LOW_SPEED_* option doesn't work as expected

From: Spacen Jasset <spacenjasset_at_yahoo.co.uk>
Date: Fri, 07 Dec 2007 12:16:07 +0000

I have set

     // We require at least one byte every 10 seconds
     curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1); // 1 byte
     curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 10); // 10 Seconds

I then perfom a large post, some 125 Megabytes over a fast LAN connection.

Reading the libcurl documentation, I come to belive that a timeout
should occur with the above options iff no bytes at all are transfered
in ten seconds.

I had assumed that this worked either way, i.e. recieve or send. My log
output below shows that curl times out after ten seconds, however that
tansfer takes 72 seconds, and has transfered all of the data. The server
also recieves all of the data and it is correct.

Is it the case that the CURLOPT_LOW_SPEED_* options only take into
account the amount of data recieved rather than posted?

07/12/2007 11:56:40 CURL: About to connect() to 192.168.100.204 port 80
(#0)
07/12/2007 11:56:40 CURL: Trying 192.168.100.204...
07/12/2007 11:56:40 CURL: connected
07/12/2007 11:56:40 CURL: Connected to 192.168.100.204
(192.168.100.204) port 80 (#0)
07/12/2007 11:56:40 CURL: POST /Discovery/HTTPsvc/IISXferWanServer.DLL
HTTP/1.1
User-Agent: HttpXferwan 10.3.2 (20071123)
Host: 192.168.100.204
Accept: */*
Content-Type: application/octet-stream
Content-Length: 128089696
07/12/2007 11:56:40 CURL: HTTP/1.1 100 Continue
07/12/2007 11:56:40 CURL: Server: Microsoft-IIS/5.1
07/12/2007 11:56:40 CURL: Date: Fri, 07 Dec 2007 11:55:24 GMT
07/12/2007 11:56:40 CURL: X-Powered-By: ASP.NET
07/12/2007 11:57:53 CURL: Operation too slow. Less than 1 bytes/sec
transfered the last 10 seconds
07/12/2007 11:57:53 CURL: Closing connection #0
07/12/2007 11:57:53 CURL: Timeout was reached
07/12/2007 11:57:53 CURL INFO: Version 'libcurl/7.17.0 OpenSSL/0.9.7d'
07/12/2007 11:57:53 CURL INFO: CURLINFO_EFFECTIVE_URL
http://192.168.100.204/Discovery/HTTPsvc/IISXferWanServer.DLL
07/12/2007 11:57:53 CURL INFO: CURLINFO_RESPONSE_CODE 100
07/12/2007 11:57:53 CURL INFO: CURLINFO_TOTAL_TIME 72.953
07/12/2007 11:57:53 CURL INFO: CURLINFO_NAMELOOKUP_TIME 0
07/12/2007 11:57:53 CURL INFO: CURLINFO_CONNECT_TIME 0.016
07/12/2007 11:57:53 CURL INFO: CURLINFO_STARTTRANSFER_TIME 0.016
07/12/2007 11:57:53 CURL INFO: CURLINFO_REDIRECT_TIME 0
07/12/2007 11:57:53 CURL INFO: CURLINFO_SIZE_UPLOAD 1.2809e+008
07/12/2007 11:57:53 CURL INFO: CURLINFO_SIZE_DOWNLOAD 0
07/12/2007 11:57:53 CURL INFO: CURLINFO_SPEED_DOWNLOAD 0 B/s
07/12/2007 11:57:53 CURL INFO: CURLINFO_SPEED_UPLOAD 1.75578e+006 B/s
07/12/2007 11:57:53 CURL INFO: CURLINFO_CONTENT_TYPE (null)
07/12/2007 11:57:53 CURL INFO: CURLINFO_PROXYAUTH_AVAIL 0x0 (NONE)
07/12/2007 11:57:53 CURL INFO: CURLINFO_NUM_CONNECTS 1
07/12/2007 11:57:53 CURL: transaction result status 28 (Timeout was
reached)
Received on 2007-12-07