Fix Guile version checking in the "web" code.
* guix/web.scm (http-fetch): fix Guile version checking. The previous version would use features from Guile 2.0.9+ when using Guile 2.0.7.
This commit is contained in:
parent
392b5d8cab
commit
16df248e4b
15
guix/web.scm
15
guix/web.scm
|
@ -157,14 +157,13 @@ unbuffered port, suitable for use in `filtered-port'."
|
||||||
;; Try hard to use the API du jour to get an input port.
|
;; Try hard to use the API du jour to get an input port.
|
||||||
;; On Guile 2.0.5 and before, we can only get a string or
|
;; On Guile 2.0.5 and before, we can only get a string or
|
||||||
;; bytevector, and not an input port. Work around that.
|
;; bytevector, and not an input port. Work around that.
|
||||||
(if (version>? "2.0.7" (version))
|
(if (version>? (version) "2.0.7")
|
||||||
(if (defined? 'http-get*)
|
(http-get uri #:streaming? #t #:port port) ; 2.0.9+
|
||||||
(http-get* uri #:decode-body? text?
|
(if (defined? 'http-get*)
|
||||||
#:port port) ; 2.0.7
|
(http-get* uri #:decode-body? text?
|
||||||
(http-get uri #:decode-body? text?
|
#:port port) ; 2.0.7
|
||||||
#:port port)) ; 2.0.5-
|
(http-get uri #:decode-body? text?
|
||||||
(http-get uri #:streaming? #t
|
#:port port)))) ; 2.0.5-
|
||||||
#:port port))) ; 2.0.9+
|
|
||||||
((code)
|
((code)
|
||||||
(response-code resp)))
|
(response-code resp)))
|
||||||
(case code
|
(case code
|
||||||
|
|
Loading…
Reference in New Issue