curl-users
Re: RFC-2732 address
Date: Tue, 4 Nov 2003 08:08:53 +0100 (CET)
On Mon, 3 Nov 2003, Gisle Vanem wrote:
> curl.exe http://[ff:fe::10.0.0.1]/
> curl: (3) [globbing] illegal pattern or range specification after pos 9
>
> The syntax is legal AFAICS according to RFC-2732 and libcurl
> seems to support it. But not curl itself. It seems it tries to glob
> an IPv6 address, not the file part.
>
> With 'curl.exe -g http://[ff:fe::10.0.0.1]/' kinda works; it skips the
> globbing and tries to resolve the address !?
Correct. Since we introduced the globbing syntax long before I was aware of
the RFC2732 way of defining IPv6-addresses, we have a slight problem to
combine those two. I have not yet been able to come up with a nice fix to
allow both without it being a bit weird.
I guess we can fix it by more or less parse the IPv6 address in the client to
see if it is a glob or an address.
The amount of people using explicit IPv6-addresses like this in anything
but test purposes to see if curl deals with them, is probably less than a
handful. And they probably can live without globbing when doing so...
> But libcurl seems to blame too by calling gethostbyname() on the address.
> Doesn't seem right.
As you noted in your follow up, and as I honestly believe, libcurl does
resolve and use the given address correctly. (I've tried it myself on a few
simple address that I've made up on my IPv6-enabled linux, but I don't have
any IPv6-enabled servers! ;-O)
-- Daniel - been obfuscating curl source code since 1998. [[ Do not post private mails to this email address. They won't reach me. ]] ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/Received on 2003-11-04