[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10410: guile: uri module confused by domain names starting with numb
From: |
Daniel Hartwig |
Subject: |
bug#10410: 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'.
0001-support-URIs-with-domain-names-starting-with-numbers.patch
Description: Text Data
- bug#10410: guile: uri module confused by domain names starting with numbers, ipv6 addresses,
Daniel Hartwig <=