cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PATCH coming soon: CURLOPT_FTP_RESPONSE_TIMEOUT

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 28 Aug 2003 10:34:17 +0200 (CEST)

On Wed, 27 Aug 2003, Early Ehlinger wrote:

> However, this problem does expose a shortcoming in libcURL. I can detect
> this hang by using CURLOPT_TIMEOUT, but that appears to limit the entire
> transfer's time. Since my customers often be upload *very* large files
> (100+ megabyte animated texture maps are not uncommon), I cannot use this
> option to govern the transfer time. I had hoped that
> CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME would detect this
> problem, but this appears to not have any effect on Curl_GetFTPResponse.

Right. CURLOPT_TIMEOUT is for the full opertion, and CURLOPT_LOW_SPEED_LIMIT
and CURLOPT_LOW_SPEED_TIME are for the actual transfer of data.

IMGO, what you should use (and probably make working properly) is the
CURLOPT_CONNECTTIMEOUT option, which is a timeout option for the full connect
operation, including the login-stuff for ftp.

> In my experience, if an FTP server doesn't respond within 10 seconds, it's
> not going to respond at all.

Possibly, but I bet a highly loaded server on the moon over your 300 bps PPP
connection could take longer... ;-)

-- 
 Daniel Stenberg -- curl: been grokking URLs since 1998
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-08-28