cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: proxy timeout

From: Marty Kuhrt <marty_at_Barra.COM>
Date: Wed, 28 Jan 2004 22:12:19 -0800 (PST)

On Fri, 23 Jan 2004, Russ Freeman wrote:

> I believe there is an issue with libcurl (I have tried the latest version)
> where an unresponsive proxy server causes an endless hang. It's quite easy
> to reproduce by simply setting the proxy name to be "localhost" and the port
> to something without a proxy on it (135).

I tried it on one of my machines, and specifying the proxy as
localhost:135 came back with an immediate error (something along the
lines of "couldn't connect"). When I tried a local port that I knew
would stall due to invalid input, (i.e. port 25), it timed out
(without putting in a timeout specification on the cURL command) when
the port 25 responder decided that all was not well and gave up.

This indicates to me that it would vary based on what the localhost IP
stack thought it should do, and not so much what cURL is supposed to
do. You could force the timeout by providing that information with
the command, at least I would think so, anyway.

I could try and set up a port that accepts connections and holds it
open, if you'd like. That would probably only prove that the cURL
response was dependant on the vagraties of the IP stack, though.

I have had this problem, previously, when a proxy server got wedged.
I've since set up my cURL commands using CURL_TIMEOUT as part of a
curl_setopt when using the library. It hasn't reoccurred, but then
again I just set this up a few days ago, and predicting when a proxy
server wedges is not an exact science.

Just my $.02,
Marty

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Received on 2004-01-31