From ae533e3084b726188e78d1519f058e05c8388960 Mon Sep 17 00:00:00 2001 From: Philip McGrath Date: Wed, 18 May 2022 14:10:54 -0400 Subject: http-client: 'http-fetch/cached' converts strings to URIs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * guix/http-client.scm (http-fetch/cached): Use 'string->uri' if URI is a string, as with 'http-fetch'. Signed-off-by: Ludovic Courtès --- guix/http-client.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'guix') diff --git a/guix/http-client.scm b/guix/http-client.scm index 699f5dfd57..9138a627ac 100644 --- a/guix/http-client.scm +++ b/guix/http-client.scm @@ -314,7 +314,10 @@ (define* (http-fetch/cached uri #:key (ttl (%http-cache-ttl)) text? TIMEOUT specifies the timeout in seconds for connection establishment. Write information about redirects to LOG-PORT." - (let ((file (cache-file-for-uri uri))) + (let* ((uri (if (string? uri) + (string->uri uri) + uri)) + (file (cache-file-for-uri uri))) (define (update-cache cache-port) (define cache-time (and cache-port -- cgit v1.2.3