http-client: 'http-fetch' converts strings to URIs.

* guix/http-client.scm (http-fetch): Use 'string->uri' if URI is a
string.  Fixes a regression introduced in 8a5063f.
This commit is contained in:
Ludovic Courtès 2015-11-29 17:46:11 +01:00
parent 841cb43c6b
commit 25d188ce12

View file

@ -207,7 +207,9 @@ (define* (http-fetch uri #:key port (text? #f) (buffered? #t))
unbuffered port, suitable for use in `filtered-port'.
Raise an '&http-get-error' condition if downloading fails."
(let loop ((uri uri))
(let loop ((uri (if (string? uri)
(string->uri uri)
uri)))
(let ((port (or port (open-connection-for-uri uri))))
(unless buffered?
(setvbuf port _IONBF))