[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53818] [PATCH v2 3/7] http-client: 'http-fetch/cached' accepts a st
From: |
Xinglu Chen |
Subject: |
[bug#53818] [PATCH v2 3/7] http-client: 'http-fetch/cached' accepts a string or a <uri>. |
Date: |
Mon, 07 Feb 2022 10:06:57 +0100 |
This is consistent with the 'http-fetch' procedure.
* guix/http-client.scm (http-fetch/cached): The 'uri' argument can be a string
or a <uri> record.
---
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 058f09852f..08efdd5e47 100644
--- a/guix/http-client.scm
+++ b/guix/http-client.scm
@@ -297,7 +297,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
--
2.34.1
- [bug#53818] [PATCH 3/3] gnu: xorg-server-xwayland: Set 'repology-name' property., (continued)
- [bug#53818] [PATCH 1/3] git-download: Export <git-reference>., Xinglu Chen, 2022/02/06
- [bug#53818] [PATCH v2 0/7] Add Repology updater, Xinglu Chen, 2022/02/07
- [bug#53818] [PATCH v2 1/7] upstream: Sort list of updaters., Xinglu Chen, 2022/02/07
- [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater., Xinglu Chen, 2022/02/07
- [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater., Maxime Devos, 2022/02/07
- [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater., Maxime Devos, 2022/02/07
- [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater., Xinglu Chen, 2022/02/08
- [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater., Maxime Devos, 2022/02/08
- [bug#53818] [PATCH v2 5/7] import: Add 'repology' updater., Xinglu Chen, 2022/02/09
[bug#53818] [PATCH v2 3/7] http-client: 'http-fetch/cached' accepts a string or a <uri>.,
Xinglu Chen <=
[bug#53818] [PATCH v2 2/7] http-client: Make 'http-fetch/cached' take '#:headers' argument., Xinglu Chen, 2022/02/07
[bug#53818] [PATCH v2 6/7] gnu: xorg-server-xwayland: Set 'repology-name' property., Xinglu Chen, 2022/02/07
[bug#53818] [PATCH v2 7/7] gnu: xorg-server-xwayland: Prepare for cross-compilation., Xinglu Chen, 2022/02/07
[bug#53818] [PATCH v2 4/7] import: json: Make 'json-fetch' take '#:cached?' argument., Xinglu Chen, 2022/02/07
[bug#53818] [PATCH v3 0/7] Add Repology updater, Xinglu Chen, 2022/02/09