guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

07/35: http-client: 'http-fetch/cached' converts strings to URIs.


From: guix-commits
Subject: 07/35: http-client: 'http-fetch/cached' converts strings to URIs.
Date: Sat, 21 May 2022 19:43:04 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit ae533e3084b726188e78d1519f058e05c8388960
Author: Philip McGrath <philip@philipmcgrath.com>
AuthorDate: Wed May 18 14:10:54 2022 -0400

    http-client: 'http-fetch/cached' converts strings to URIs.
    
    * 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 <ludo@gnu.org>
---
 guix/http-client.scm | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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 @@ added automatically as appropriate.
 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]