summaryrefslogtreecommitdiff
path: root/module/web/uri.scm
diff options
context:
space:
mode:
authorDaniel Hartwig <mandyke@gmail.com>2011-12-30 17:49:37 +0800
committerAndy Wingo <wingo@pobox.com>2012-07-06 12:33:16 +0200
commit274e2eecf18a726280802230ab50774fa11e1107 (patch)
treeaf87c70fc9b8cbbdbb53673eea1482d3c66dd1bd /module/web/uri.scm
parentd540a1d648d9f7532e3e870b48184fa2b7949f9a (diff)
downloadguile-274e2eecf18a726280802230ab50774fa11e1107.tar.gz
support URIs with domain names starting with numbers
* module/web/uri.scm (valid-host?): Fix regexp to support domain names starting with numbers. * test-suite/tests/web-uri.scm: Add tests for above and IP literals.
Diffstat (limited to 'module/web/uri.scm')
-rw-r--r--module/web/uri.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/web/uri.scm b/module/web/uri.scm
index a2a930a6a..695442904 100644
--- a/module/web/uri.scm
+++ b/module/web/uri.scm
@@ -91,7 +91,7 @@ consistency checks to make sure that the constructed URI is valid."
(define ipv4-regexp
(make-regexp "^([0-9.]+)$"))
(define ipv6-regexp
- (make-regexp "^\\[([0-9a-fA-F:]+)\\]+$"))
+ (make-regexp "^\\[([0-9a-fA-F:]+)\\]$"))
(define domain-label-regexp
(make-regexp "^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?$"))
(define top-label-regexp