mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-24 19:27:44 +01:00
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>.
This commit is contained in:
parent
83c60bb062
commit
504fd36a85
1 changed files with 1 additions and 1 deletions
|
@ -656,7 +656,7 @@ (define (handle-narinfo-response request response port result)
|
|||
(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))))
|
||||
|
|
Loading…
Reference in a new issue