cURL / Mailing Lists / curl-users / Single Mail

curl-users

[Bug#158173: curl: Timeout if proxy is down]

From: Domenico Andreoli <cavok_at_filibusta.crema.unimi.it>
Date: Tue, 3 Sep 2002 14:00:31 +0200

hi daniel,

i have this bug report against 7.9.8, maybe you are able to fix it
before 7.10 is released.

as always you can read it also at http://bugs.debian.org/158173 .

cheers
cavok

----- Forwarded message from change_at_nas.com -----

Date: Sun, 25 Aug 2002 11:04:40 -0700 (PDT)
Subject: Bug#158173: curl: Timeout if proxy is down

Package: curl
Version: 7.9.8-2

...

I noticed that curl's timeout options, -y and -Y, don't work if
used with a proxy (the -x option) that happens to be down.

As I write this on 8/25/02, I can duplicate the bug with

        $ curl -y 5 -Y 240000 -x cobalt3.cotel.de:80 -o /dev/null http://www.wwu.edu/about/map/cmapsm.jpg

It should time out after five seconds, but doesn't.

I can see that the proxy is down with ping.

        $ ping -c 1 cobalt3.cotel.de
        PING cobalt3.cotel.de (217.29.1.2): 56 data bytes

        --- cobalt3.cotel.de ping statistics ---
        1 packets transmitted, 0 packets received, 100% packet loss

When I switch to a proxy that's up, such as fan.bravo.de:80, ping works and
curl times out.

The bug can be worked around by only running curl if ping works,
as follows:

     if ping -c 1 fan.bravo.de ; then
         curl -y 5 -Y 240000 -x fan.bravo.de:80 -o /dev/null http://www.wwu.edu/about/map/cmapsm.jpg
     else
         echo "proxy unavailable"
     fi

My ping times out after 10 seconds.

Please enhance curl so it also times out if the proxy is down.

...

----- End forwarded message -----

-----[ Domenico Andreoli, aka cavok
 --[ http://filibusta.crema.unimi.it/~cavok/gpgkey.asc
   ---[ 3A0F 2F80 F79C 678A 8936 4FEE 0677 9033 A20E BC50

-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone? Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Received on 2002-09-03