diff options
author | Cyril Roelandt <tipecaml@gmail.com> | 2013-06-10 10:40:35 +0200 |
---|---|---|
committer | Cyril Roelandt <tipecaml@gmail.com> | 2013-06-10 10:43:23 +0200 |
commit | 16df248e4b24b174d6e2eb7167730d6674b7441e (patch) | |
tree | 73d550688fea351b31121f8f3d5b465103f8997f | |
parent | 392b5d8cab0c676f19d14a139f14802ef0237ddf (diff) | |
download | guix-16df248e4b24b174d6e2eb7167730d6674b7441e.tar.gz |
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.
-rw-r--r-- | guix/web.scm | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/guix/web.scm b/guix/web.scm index e9c69cb0c0..d24f15853d 100644 --- a/guix/web.scm +++ b/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. ;; On Guile 2.0.5 and before, we can only get a string or ;; bytevector, and not an input port. Work around that. - (if (version>? "2.0.7" (version)) - (if (defined? 'http-get*) - (http-get* uri #:decode-body? text? - #:port port) ; 2.0.7 - (http-get uri #:decode-body? text? - #:port port)) ; 2.0.5- - (http-get uri #:streaming? #t - #:port port))) ; 2.0.9+ + (if (version>? (version) "2.0.7") + (http-get uri #:streaming? #t #:port port) ; 2.0.9+ + (if (defined? 'http-get*) + (http-get* uri #:decode-body? text? + #:port port) ; 2.0.7 + (http-get uri #:decode-body? text? + #:port port)))) ; 2.0.5- ((code) (response-code resp))) (case code |