diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-05-11 10:24:49 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-05-11 18:05:42 +0200 |
commit | 5db5dff53d255eb0738de4b44717a4b148fb8294 (patch) | |
tree | e7eacb25fec4bb8e0def96810010d1010f8b8abc | |
parent | 24b21720f7c3a368efc32017c126e107a5d76f52 (diff) | |
download | guix-5db5dff53d255eb0738de4b44717a4b148fb8294.tar guix-5db5dff53d255eb0738de4b44717a4b148fb8294.tar.gz |
substitute: Honor 'Cache-Control' on 404 responses.
* guix/scripts/substitute.scm (cached-narinfo): When VALUE is #f, use
the TTL that is read instead of %NARINFO-NEGATIVE-TTL.
(cached-narinfo-expiration-time): Likewise.
-rwxr-xr-x | guix/scripts/substitute.scm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 53162b3f9a..73d4f6e2eb 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -472,9 +472,9 @@ for PATH." (match (read p) (('narinfo ('version 2) ('cache-uri cache-uri) - ('date date) ('ttl _) ('value #f)) + ('date date) ('ttl ttl) ('value #f)) ;; A cached negative lookup. - (if (obsolete? date now %narinfo-negative-ttl) + (if (obsolete? date now ttl) (values #f #f) (values #t #f))) (('narinfo ('version 2) @@ -722,7 +722,7 @@ was found." (match (read port) (('narinfo ('version 2) ('cache-uri uri) ('date date) ('ttl ttl) ('value #f)) - (+ date %narinfo-negative-ttl)) + (+ date ttl)) (('narinfo ('version 2) ('cache-uri uri) ('date date) ('ttl ttl) ('value value)) (+ date ttl)) |