bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] How does --connect-timeout work?


From: Peng Yu
Subject: [Bug-wget] How does --connect-timeout work?
Date: Wed, 24 Oct 2018 12:12:07 -0500

Hi,

The second command hangs forever. I am not sure what is wrong with it.
My understanding is that if I set connect-timeout short enough, wget
should fail. Could anybody let me know how to get this behavior? (See
the curl output below as a reference.)

$ time wget -qO- http://httpbin.org/get
{
  "args": {},
  "headers": {
    "Accept": "*/*",
    "Accept-Encoding": "identity",
    "Connection": "close",
    "Host": "httpbin.org",
    "User-Agent": "Wget/1.19.5 (darwin17.7.0)"
  },
  "origin": "165.91.49.229",
  "url": "http://httpbin.org/get";
}

real    0m0.237s
user    0m0.005s
sys    0m0.006s
$ wget --connect-timeout .0001 -qO- http://httpbin.org/get
$ curl --connect-timeout .1 http://httpbin.org/get
curl: (28) Connection timed out after 100 milliseconds

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]