1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 14:00:21 +02:00

quick fix to uri parser

* module/web/uri.scm: Quick fix to not throw an error on e.g.
  http://2012.jsconf.us.
This commit is contained in:
Andy Wingo 2012-02-21 16:42:53 +00:00
parent 98385ed20a
commit 1868309a9e

View file

@ -89,13 +89,13 @@ consistency checks to make sure that the constructed URI is valid."
;; 3490), and non-ASCII host names.
;;
(define ipv4-regexp
(make-regexp "^([0-9.]+)"))
(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
(make-regexp "^[a-zA-Z]([a-zA-Z0-9-]*[a-zA-Z0-9])?$"))
(make-regexp "^[a-zA-Z]?([a-zA-Z0-9-]*[a-zA-Z0-9])?$"))
(define (valid-host? host)
(cond