mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
download: Cope with Guile 2.0.6 or earlier.
* guix/build/download.scm: Do not attempt to support relative URIs in "Location" headers if 'declare-relative-uri-header!' is not present. This is the case for Guile 2.0.6 or earlier.
This commit is contained in:
parent
da71f145c6
commit
c964a15d82
1 changed files with 6 additions and 4 deletions
|
@ -211,10 +211,12 @@ (define addresses
|
|||
(unless (or (> (string->number (major-version)) 2)
|
||||
(> (string->number (minor-version)) 0)
|
||||
(> (string->number (micro-version)) 11))
|
||||
(let ((declare-relative-uri-header!
|
||||
(module-ref (resolve-module '(web http))
|
||||
(let ((var (module-variable (resolve-module '(web http))
|
||||
'declare-relative-uri-header!)))
|
||||
(declare-relative-uri-header! "Location")))
|
||||
;; If 'declare-relative-uri-header!' doesn't exist, forget it.
|
||||
(when (and var (variable-bound? var))
|
||||
(let ((declare-relative-uri-header! (variable-ref var)))
|
||||
(declare-relative-uri-header! "Location")))))
|
||||
|
||||
(define (resolve-uri-reference ref base)
|
||||
"Resolve the URI reference REF, interpreted relative to the BASE URI, into a
|
||||
|
|
Loading…
Reference in a new issue