cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Hangs through unresponsive proxy

From: Russ Freeman <russf_at_gipsymedia.com>
Date: Tue, 27 Jan 2004 15:37:55 -0000

Hi,

> > 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 can't repeat it. Are you saying that the listening port reads the whole
> request and never outputs any response?

Basically it would happen if a customer entered bad proxy settings...the
result is my product just sitting and waiting.

I tested "curl" with the following commandline (just so I could eliminate my
code):
curl -x localhost:135 http://www.digiguide.com/

curl will wait for either a very long time or forever...I didn't wait
"forever" but I'm guessing that curl might ;-)

I'm using Windows XP Pro if that makes any difference.

> > The code that loops is the " while (!done)" loop in Transfer
> (transfer.c).
> > It just never gets done and " result = Curl_readwrite(conn, &done);" is
> > never set...and around it goes.
>
> Yes, if it gets no data and the connection is kept, then it sits there
> waiting
> for a response. curl can't tell the difference from a slow response. You'd
> need to set a timeout to make it bail out, or simply a slow-speed setting.

I have a timeout but it does not help. The code is stuck in the libcurl loop
mentioned and the only way to stop it (for the customer) is to terminate
the application.

Russ.

-------------------------------------------------------
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-28