cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1371118 ] IPv6 RFC 2732 addrs are not fully supported

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 08 Dec 2009 02:15:52 +0000

Bugs item #1371118, was opened at 2005-12-01 10:50
Message generated for change (Comment added) made by gback
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1371118&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong behaviour
Status: Closed
Resolution: Accepted
Priority: 2
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel Stenberg (bagder)
Summary: IPv6 RFC 2732 addrs are not fully supported

Initial Comment:
Recently support for RFC 2732 style IPv6 addresses was
added to the proxy option, but a non-proxy address
remains broken.

Also, it seems zone IDs are not properly parsed..

Bad zone parsing:

curl -x 'http://[fe80::2e0:81ff:fe28:d04c%eth2]:8080/'
http://moo/
curl: (5) Couldn't resolve proxy 'fe80'

No 2732 parsing on addreses:

curl -6 'http://[fe80::2e0:81ff:fe28:d04c]:8080/'
curl: (3) [globbing] illegal pattern or range
specification after pos 9

curl -V
curl 7.15.0 (i686-pc-linux-gnu) libcurl/7.15.0
OpenSSL/0.9.7e zlib/1.2.2 libidn/0.5.13
Protocols: tftp ftp gopher telnet dict ldap http file
https ftps
Features: IDN IPv6 Largefile NTLM SSL libz

It doesn't seem clear what the correct format is for a
zone ID in a URI should be WRT to escaping the %, but
at least firefox 1.0.4 requires the % be unescaped..

----------------------------------------------------------------------

Comment By: Godmar Back (gback)
Date: 2009-12-07 18:15

Message:
Why was this bug closed? curl 7.15.5 still doesn't provide a way to specify
a zone id, contrary to documentation.

The documentation states (http://curl.linux-mirror.org/docs/manual.html )

Link local and site local addresses including a scope identifier, such as
fe80::1234%1,
may also be used, but the scope portion must be numeric and the percent
character must be URL escaped.

However, this doesn't appear to work:

$ curl -g 'http://[fe80::215:c5ff:fef0:5af8%252]:9011/'
curl: (6) Couldn't resolve host '[fe80::215:c5ff:fef0:5af8%252]'

That's what should work based on the documentation.
The following variants don't work, either:

$ curl -g 'http://[fe80::215:c5ff:fef0:5af8%2]:9011/'
curl: (6) Couldn't resolve host '[fe80::215:c5ff:fef0:5af8%2]'
$ curl -g 'http://[fe80::215:c5ff:fef0:5af8%25eth0]:9011/'
curl: (6) Couldn't resolve host '[fe80::215:c5ff:fef0:5af8%25eth0]'
$ curl -g 'http://[fe80::215:c5ff:fef0:5af8%eth0]:9011/'
curl: (6) Couldn't resolve host '[fe80::215:c5ff:fef0:5af8%eth0]'
$ curl -g 'http://[fe80::215:c5ff:fef0:5af8+eth0]:9011/'
curl: (6) Couldn't resolve host '[fe80::215:c5ff:fef0:5af8+eth0]'
$ curl -g 'http://[fe80::215:c5ff:fef0:5af8+2]:9011/'
curl: (6) Couldn't resolve host '[fe80::215:c5ff:fef0:5af8+2]'

By comparison, 'ssh fe80::215:c5ff:fef0:5af8%2' and 'ssh
fe80::215:c5ff:fef0:5af8%eth0' both work.

Can you clarify why this has remained a 'known bug' for so long - it makes
it impossible to try out http over IPv6 in environments without site-local
or global IPv6 addresses.

Thanks.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-12-12 14:50

Message:
Logged In: YES
user_id=1110

Added to the KNOWN_BUGS document

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-12-05 01:51

Message:
Logged In: YES
user_id=1110

Ok, I consider this a low priority issue. If it bothers
someone bad enough, I'm sure that someone can make a patch
and send it to us.

If not, I'll just add this to the known bugs document in a
while and close this report.

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2005-12-01 17:23

Message:
Logged In: YES
user_id=236775

I ran across this Internet-Draft that discusses the issue:
http://www.ietf.org/internet-drafts/draft-fenner-literal-zone-02.txt
It specifies the use of a plus sign instead of a percent
when specifying zone IDs in URLs to get around the problem
of percent signs being special.

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2005-12-01 15:47

Message:
Logged In: YES
user_id=236775

Sorry, missed your response about -g. That means that you
can't use the globbing feature at all with IPv6 numeric
hosts, which seems like an unfortunate workaround.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-12-01 15:44

Message:
Logged In: YES
user_id=1110

Yes, it fails with IPv6 numericals if -g isn't used.

----------------------------------------------------------------------

Comment By: Dan Fandrich (dfandrich)
Date: 2005-12-01 15:42

Message:
Logged In: YES
user_id=236775

Note the second part of the bug report: curl doesn't seem to
handle numeric-format IPv6 addresses in the URL, even
without a zone ID. I just tried it myself with the same results.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-12-01 14:07

Message:
Logged In: YES
user_id=1110

Where is that "%eth2" thing defined?

It is not mentioned in RFC2732 (AFAICS) and not in RFC2373
(which RFC2732 refers to in regard how the literal string
should look like between the brackets).

So, I would say that it seems curl _is_ RFC2732 compliant
but we might need to extend its compliance to some other
spec that defines the "%ethN" suffix.

----------------------------------------------------------------------

Comment By: Daniel Stenberg (bagder)
Date: 2005-12-01 14:00

Message:
Logged In: YES
user_id=1110

The second case works if you disable "globbing" with -g.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1371118&group_id=976
Received on 2009-12-08

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET