emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#10410: closed (guile: uri module confused by domai


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#10410: closed (guile: uri module confused by domain names starting with numbers, ipv6 addresses)
Date: Fri, 06 Jul 2012 12:17:04 +0000

Your message dated Fri, 06 Jul 2012 13:15:12 +0200
with message-id <address@hidden>
and subject line Re: bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri 
module
has caused the debbugs.gnu.org bug report #10410,
regarding guile: uri module confused by domain names starting with numbers, 
ipv6 addresses
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
10410: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10410
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: guile: uri module confused by domain names starting with numbers, ipv6 addresses Date: Fri, 30 Dec 2011 18:14:56 +0800
Package: guile
Version: 2.0.3
Tags: patch
X-Debbugs-CC: address@hidden


Hello

I have noticed that the (web uri) module does not handle domain names
that start with numbers:

scheme@(guile-user)> (string->uri "http://123.com";)
$1 = #f
scheme@(guile-user)> (build-uri 'http #:host "123.com")
web/uri.scm:85:6: In procedure build-uri:
web/uri.scm:85:6: Throw to key `uri-error' with args `("Expected valid
host: ~s" ("123.com"))'.


Also, `string->uri' does not handle ipv6 addresses:

scheme@(guile-user)> (string->uri "http://[2001:db8::1]";)
$2 = #f


Attached patch implements support for domain names that start with
numbers by correcting the
regular expressions used by `valid-host?' as well as some related tests.

`string->uri' requires similar changes to support the ipv6 address
literals.  I'm yet to found a very elegant way to do this though it is
easy enough to simply butcher `authority-pat'.

Attachment: 0001-support-URIs-with-domain-names-starting-with-numbers.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#10410: bump: Bug#10410: numbers, ipv6 addresses in uri module Date: Fri, 06 Jul 2012 13:15:12 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)
On Wed 22 Feb 2012 07:15, Daniel Hartwig <address@hidden> 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/


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]