unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module
       [not found] <CAN3veRdwGmW5wOgaRfKd30P_yFXk9nrddCin6L3EjKJKX_xrmw@mail.gmail.com>
@ 2012-02-22  6:15 ` Daniel Hartwig
  2012-07-06 11:15   ` Andy Wingo
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Hartwig @ 2012-02-22  6:15 UTC (permalink / raw)
  To: 10410

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 <wingo@pobox.com>    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 <mandyke@gmail.com> 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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module
  2012-02-22  6:15 ` bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module Daniel Hartwig
@ 2012-07-06 11:15   ` Andy Wingo
  2012-07-07  4:01     ` Daniel Hartwig
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Wingo @ 2012-07-06 11:15 UTC (permalink / raw)
  To: Daniel Hartwig; +Cc: 10410-done

On Wed 22 Feb 2012 07:15, Daniel Hartwig <mandyke@gmail.com> writes:

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

Sorry for the long delay.  I have applied your patches on my hasty
commits.  There were a couple bugs that this brought out; for example on
my system, inet-pton does not expect the address to be surrounded by
[].  I fixed this to have the uri-host / build-uri #:host to never have
brackets.

WDYT?  Marking as done as your code is in, with tests.  Thanks very much
for the report and patch!

Andy
-- 
http://wingolog.org/





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module
  2012-07-06 11:15   ` Andy Wingo
@ 2012-07-07  4:01     ` Daniel Hartwig
  2012-07-07  9:38       ` Andy Wingo
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Hartwig @ 2012-07-07  4:01 UTC (permalink / raw)
  To: 10410

On 6 July 2012 19:15, Andy Wingo <wingo@pobox.com> wrote:
> On Wed 22 Feb 2012 07:15, Daniel Hartwig <mandyke@gmail.com> writes:
>
>> Bumping this bug report as it is relevant to commit 1868309 which
>> recently addressed the issue with domain names starting with numbers.
>
> Sorry for the long delay.

Please, no :-)  Your meticulous approach to maintenance is
commendable.  All are confident of the eventuality of the next “serial
processing” session.

> I have applied your patches on my hasty
> commits.  There were a couple bugs that this brought out; for example on
> my system, inet-pton does not expect the address to be surrounded by
> [].

Nice spot.  Evidently when I originally looked in to this I did not
get much past string->uri and assumed the job done (*what* happened to
the actual task I was trying to complete then?!)

> I fixed this to have the uri-host / build-uri #:host to never have
> brackets.

Works well.  One small nitpick, depending on what uri-host is defined
to be returning this may or may not differ from spec.:

 host        = IP-literal / IPv4address / reg-name

 IP-literal    = "[" ( IPv6address / IPvFuture  ) "]"

In my intuition, a call to build-uri is naturally of the form:

 (build-uri #:scheme 'http
            #:host "[2001:db8::1]")

Though, for convenience, this begs for a predicate or two for
ip-literals and conversion from ip-literal->ipv6-address.

Anyway, working is better than not working, thanks :-)





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module
  2012-07-07  4:01     ` Daniel Hartwig
@ 2012-07-07  9:38       ` Andy Wingo
  0 siblings, 0 replies; 4+ messages in thread
From: Andy Wingo @ 2012-07-07  9:38 UTC (permalink / raw)
  To: Daniel Hartwig; +Cc: 10410

Hi Daniel,

Thanks for testing (& for the original patches :)

On Sat 07 Jul 2012 06:01, Daniel Hartwig <mandyke@gmail.com> writes:

> One small nitpick, depending on what uri-host is defined to be
> returning this may or may not differ from spec.:
>
>  host        = IP-literal / IPv4address / reg-name
>
>  IP-literal    = "[" ( IPv6address / IPvFuture  ) "]"
>
> In my intuition, a call to build-uri is naturally of the form:
>
>  (build-uri #:scheme 'http
>             #:host "[2001:db8::1]")

Yeah it is a bit confusing.  I think the thing to do is to consider the
brackets as part of how ip-literals are delimited within a URI, and not
part of the host itself.  Thus it would be Guile's responsibility to add
them or remove them.  But as you say, this goes against the RFC.

At the same time, I'd like to be able to always pass the result of
inet-ntop to build-uri #:host.

The internet is a messy place!

Andy
-- 
http://wingolog.org/





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-07-07  9:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAN3veRdwGmW5wOgaRfKd30P_yFXk9nrddCin6L3EjKJKX_xrmw@mail.gmail.com>
2012-02-22  6:15 ` bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module Daniel Hartwig
2012-07-06 11:15   ` Andy Wingo
2012-07-07  4:01     ` Daniel Hartwig
2012-07-07  9:38       ` Andy Wingo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).