Bug#614948: Missing support for IPv6 host literals

Ben Hutchings ben at decadent.org.uk
Thu Feb 24 13:18:32 UTC 2011


On Thu, 2011-02-24 at 12:53 +0000, Ben Hutchings wrote:
> Package: libwww-perl
> Version: 5.837-1
> Severity: serious
> Tags: ipv6
> 
> The format of IPv6 host literals in URLs is specified in RFC 2732.
> 
> $ ping6 2001:470:1f08:1539::4
> PING 2001:470:1f08:1539::4(2001:470:1f08:1539::4) 56 data bytes
> 64 bytes from 2001:470:1f08:1539::4: icmp_seq=1 ttl=64 time=7.94 ms
> ^C
> --- 2001:470:1f08:1539::4 ping statistics ---
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
> rtt min/avg/max/mdev = 7.945/7.945/7.945/0.000 ms
> $ HEAD http://[2001:470:1f08:1539::4]:80/
> 500 Can't connect to 2001:470:1f08:1539::4:80 (Bad hostname '2001:470:1f08:1539::4')
> Content-Type: text/plain
> Client-Date: Thu, 24 Feb 2011 12:52:41 GMT
> Client-Warning: Internal response

Oh, it's worse than that.  I thought hostnames resolving to IPv6
addresses worked, but HEAD is just using the IPv4 address.  Picking a
hostname without an IPv4 address:

$ strace -e socket HEAD http://ipv6.google.com/
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
socket(PF_FILE, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3
500 Can't connect to ipv6.google.com:80 (Bad hostname 'ipv6.google.com')
Content-Type: text/plain
Client-Date: Thu, 24 Feb 2011 13:14:44 GMT
Client-Warning: Internal response

Ben.

-- 
Ben Hutchings
Once a job is fouled up, anything done to improve it makes it worse.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: This is a digitally signed message part
URL: <http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20110224/1322ff40/attachment.pgp>


More information about the pkg-perl-maintainers mailing list