cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: ECHO responses

From: Ralph Mitchell <rmitchell_at_eds.com>
Date: Tue, 06 May 2003 03:49:49 -0500

Curl doesn't need to use ECHO. It set a couple of timers (--connect-timeout
and --max-time) then requests the webpage and waits for a response. If the
server doesn't respond at all, you'll get the connect timeout. If the server
allows the connection but is slow to provide the web page, you'd eventually
hit the max time timeout.

The difference between curl and a browser is that curl doesn't automatically
retry the request. That's up to you to write into your scripts...

I guess to emulate a browser more closely, both --connect-timeout and
--max-time ought to be kept small and the request issued multiple times in
the event of timeouts.

Ralph Mitchell

"Hans H. Anderson" wrote:

> I'm using Curl to interact with authorize.net (using OpenSSL). This
> usually works great, but it times out sometimes, even while there is no
> obvious long-term outage or problem with my or authorize.net's server. I
> have the timeout set high, up to 40 seconds.
>
> I tried traceroute and ping to the authorize.net servers and it apparently
> rejects them (is silent). There is no response, but at the same time, I
> can use their servers for normal transactions. I'm guessing they were
> getting a lot of ping attacks and such so they just stopped responding to
> ECHO requests.
>
> The reason I bring all this up is that I'm guessing that Curl uses some
> sort of ECHO packet when determining the timeout: request sent to server,
> no immediate response, ping to find server, no response, timeout? Am I in
> the ballpark? I'm not a C programmer or I'd be able to figure it out
> myself.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-05-06