1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00

rename string->uri and uri->string.

* module/web/uri.scm (string->uri, uri->string): Rename from parse-uri
  and unparse-uri.

* test-suite/tests/web-uri.test:
* module/web/http.scm: All callers changed.
This commit is contained in:
Andy Wingo 2010-12-31 12:44:11 -05:00
parent b3f9444892
commit 8745c33afb
3 changed files with 24 additions and 24 deletions

View file

@ -628,7 +628,7 @@ ordered alist."
(display (date->string date "~a, ~d ~b ~Y ~H:~M:~S GMT") port))
(define (write-uri uri port)
(display (unparse-uri uri) port))
(display (uri->string uri) port))
(define (parse-entity-tag val)
(if (string-prefix? "W/" val)
@ -751,7 +751,7 @@ not have to have a scheme or host name. The result is a URI object."
#:query (and q (substring str (1+ q) (or f end)))
#:fragment (and f (substring str (1+ f) end)))))
(else
(or (parse-uri (substring str start end))
(or (string->uri (substring str start end))
(bad-request "Invalid URI: ~a" (substring str start end))))))
(define (read-request-line port)
@ -890,7 +890,7 @@ phrase\"."
((_ sym name)
(declare-header sym
name
(lambda (str) (or (parse-uri str) (bad-header-component 'uri str)))
(lambda (str) (or (string->uri str) (bad-header-component 'uri str)))
uri?
write-uri))))