guix-commits
[Top][All Lists]
Advanced

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

branch master updated: substitute: Do not discard ttl info when the resp


From: guix-commits
Subject: branch master updated: substitute: Do not discard ttl info when the response code is 202.
Date: Wed, 28 Oct 2020 14:30:16 -0400

This is an automated email from the git hooks/post-receive script.

m1gu3l pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 504fd36  substitute: Do not discard ttl info when the response code is 
202.
504fd36 is described below

commit 504fd36a85e1054aec8179011bf2ca012e32b92e
Author: Miguel Ángel Arruga Vivas <rosen644835@gmail.com>
AuthorDate: Wed Oct 28 19:03:59 2020 +0100

    substitute: Do not discard ttl info when the response code is 202.
    
    * guix/scripts/substitute.scm (fetch-narinfos)
    [handle-narinfo-response]: Add code 202 to the condition.  This will
    allow in the future the use of 404 for nar requests which cannot be
    built in the present, leaving for the 202 to indicate that a request has
    triggered a nar generation that might be completed later, as specified
    in <https://www.ietf.org/rfc/rfc2616.txt>.
---
 guix/scripts/substitute.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm
index 7ec170b..ddb885d 100755
--- a/guix/scripts/substitute.scm
+++ b/guix/scripts/substitute.scm
@@ -656,7 +656,7 @@ print a warning and return #f."
                 (get-bytevector-n port len)
                 (read-to-eof port))
             (cache-narinfo! url (hash-part->path hash-part) #f
-                            (if (= 404 code)
+                            (if (or (= 404 code) (= 202 code))
                                 ttl
                                 %narinfo-transient-error-ttl))
             result))))



reply via email to

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