[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] How does --connect-timeout work?
From: |
Tim Rühsen |
Subject: |
Re: [Bug-wget] How does --connect-timeout work? |
Date: |
Thu, 25 Oct 2018 09:39:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 |
Hi,
the default is to try 20 times with a increasing wait time inbetween
(that is documented).
Add --tries=1 and it will behave as you want.
Regards, Tim
On 10/24/18 7:12 PM, Peng Yu wrote:
> 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
>
signature.asc
Description: OpenPGP digital signature