* Daniel Stenberg <dan...@haxx.se> [2023-08-08 23:39]: > On Tue, 8 Aug 2023, FC Stegerman wrote: > > > $ curl ‐‐connect‐timeout > > curl: (6) Could not resolve host: xn--connecttimeout-462hah > > > > $ curl ‐‐connect‐timeout 2 -I example.com > > curl: (6) Could not resolve host: xn--connecttimeout-462hah > > Those dashes in there are not ascii minuses, they are unicode e2 80 90 (when > copied from the web page for this report), also known as Unicode Character > 'HYPHEN' (U+2010). > > Since they are not ascii minus (ascii byte code 45), they do not specify the > command line option --connect-timeout but that sequence of characters is > instead treaded as a "URL", which is converted from its unicode into > punycode before resolved. > > And on and on. This is not the bug it is made out to be.
You are absolutely correct. And it makes sense now. That does leave a bug of sorts in the curl man page, which is where I copied that from. Looking at curl.1 I see: .IP "\-\-connect-timeout <fractional seconds>" [...] Examples: .nf curl --connect-timeout 20 https://example.com curl --connect-timeout 3.14 https://example.com .fi It seems that the unescaped dashes become U+2010. I was not expecting that, hence my not realising what was going on. Sorry about that. - FC