Subject: bump: Bug#10410: numbers, ipv6 addresses in uri module

From: Daniel Hartwig <[email-masked]>
Date: Wed, 22 Feb 2012 14:15:26 +0800

Bumping this bug report as it is relevant to commit 1868309 which
recently addressed the issue with domain names starting with numbers.

> author        Andy Wingo <[email-masked]>    2012-02-21 16:42:53 (GMT)
> commit        1868309a9e34a04a5b3020e147d0ce029038b290 (patch) (side-by-side diff)
> ...
> (define ipv6-regexp
> - (make-regexp "^\\[([0-9a-fA-F:]+)\\]+"))
> + (make-regexp "^\\[([0-9a-fA-F:]+)\\]+$"))

Please compare this regexp to the one in the previously sent 0001
patch.  You will note that the second "+" here matches values with
extraneous characters such as "[::1]]]".

Also, the character group does not include a "." which is valid in
ipv6 addresses with dotted-quad notation[1].  This is introduced by
the 0002 patch (see below).

0001 provides additional test cases handling domains names starting
with numbers as well.

Daniel Hartwig <[email-masked]> wrote:
> Also, `string->uri' does not handle ipv6 addresses:
>
> scheme@(guile-user)> (string->uri "http://[2001:db8::1]")
> $2 = #f

This issue remains outstanding and addressed in the 0002 patch with
test cases provided.

Regards

[1] http://tools.ietf.org/html/rfc1884#page-5

    3. An alternative form that is sometimes more convenient when
       dealing with a mixed environment of IPv4 and IPv6 nodes is
       x:x:x:x:x:x:d.d.d.d, where the 'x's are the hexadecimal values
       of the six high-order 16-bit pieces of the address, and the 'd's
       are the decimal values of the four low-order 8-bit pieces of the
       address (standard IPv4 representation).  Examples:

            0:0:0:0:0:0:13.1.68.3

            0:0:0:0:0:FFFF:129.144.52.38

       or in compressed form:

            ::13.1.68.3

            ::FFFF:129.144.52.38