curl-users
Re: host name with hyphen or underscore at the beginning
Date: Fri, 15 Jun 2007 11:47:31 +0200 (CEST)
On Fri, 15 Jun 2007, Haejoong Lee wrote:
> I get an error message like the following if the host name begins with a
> hyphen or underscore.
>
> curl: (6) Couldn't resolve host ...
What curl version on what platform using what resolver?
> I looked at RFC 3936 and it allows such host names.
>
> host = IP-literal / IPv4address / reg-name
> reg-name = *( unreserved / pct-encoded / sub-delims )
> unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
>
> Does anyone know what the problem is?
I can't see anything in (lib)curl that limits the name like this. In fact
libcurl allows far more letters than that...
I just tested with several curl versions, but then I don't have any host names
starting with these letters.
For host names that start with a dash, you might need to do it like:
"curl -- -host"
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2007-06-15