diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-12-12 11:42:12 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-12-12 11:48:46 +0100 |
commit | e82e55e58c67b0215e768c4612ca542bc670f633 (patch) | |
tree | 856c4512fa1fbde59c1d9845c5a763ef8c4a14b4 /guix/http-client.scm | |
parent | 98bd851ee891ca4a84e061fe1e78ba78c292b096 (diff) | |
parent | e35dff973375266db253747140ddf25084ecddc2 (diff) | |
download | guix-patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar guix-patches-e82e55e58c67b0215e768c4612ca542bc670f633.tar.gz |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/http-client.scm')
-rw-r--r-- | guix/http-client.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/guix/http-client.scm b/guix/http-client.scm index bee8cdc834..eb2c3f4d5f 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -35,7 +35,8 @@ #:use-module ((guix build utils) #:select (mkdir-p dump-port)) #:use-module ((guix build download) - #:select (open-socket-for-uri resolve-uri-reference)) + #:select (open-socket-for-uri + open-connection-for-uri resolve-uri-reference)) #:re-export (open-socket-for-uri) #:export (&http-get-error http-get-error? @@ -206,8 +207,10 @@ textual. Follow any HTTP redirection. When BUFFERED? is #f, return an unbuffered port, suitable for use in `filtered-port'. Raise an '&http-get-error' condition if downloading fails." - (let loop ((uri uri)) - (let ((port (or port (open-socket-for-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)) (let*-values (((resp data) |