[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/18: swh: Adjust for compatibility with Guile 2.2's (web client).
From: |
guix-commits |
Subject: |
01/18: swh: Adjust for compatibility with Guile 2.2's (web client). |
Date: |
Wed, 5 May 2021 11:00:20 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e069611866693060976d673ebbc90ea0df767daf
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed May 5 11:34:20 2021 +0200
swh: Adjust for compatibility with Guile 2.2's (web client).
Guile <= 2.2.7 did not support #:verify-certificate? so work around it.
* guix/swh.scm (http-get*, http-post*) [! guile-3]: Add variant for
Guile 2.2.
---
guix/swh.scm | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/guix/swh.scm b/guix/swh.scm
index 2402ec9..3005323 100644
--- a/guix/swh.scm
+++ b/guix/swh.scm
@@ -148,12 +148,20 @@
url
(string-append url "/")))
-;; XXX: Work around a bug in Guile 3.0.2 where #:verify-certificate? would
-;; be ignored (<https://bugs.gnu.org/40486>).
-(define* (http-get* uri #:rest rest)
- (apply http-request uri #:method 'GET rest))
-(define* (http-post* uri #:rest rest)
- (apply http-request uri #:method 'POST rest))
+(cond-expand
+ (guile-3
+ ;; XXX: Work around a bug in Guile 3.0.2 where #:verify-certificate? would
+ ;; be ignored (<https://bugs.gnu.org/40486>).
+ (define* (http-get* uri #:rest rest)
+ (apply http-request uri #:method 'GET rest))
+ (define* (http-post* uri #:rest rest)
+ (apply http-request uri #:method 'POST rest)))
+ (else ;Guile 2.2
+ ;; Guile 2.2 did not have #:verify-certificate? so ignore it.
+ (define* (http-get* uri #:key verify-certificate? streaming?)
+ (http-request uri #:method 'GET #:streaming? streaming?))
+ (define* (http-post* uri #:key verify-certificate? streaming?)
+ (http-request uri #:method 'POST #:streaming? streaming?))))
(define %date-regexp
;; Match strings like "2014-11-17T22:09:38+01:00" or
- branch master updated (da7f89c -> f30e8f2), guix-commits, 2021/05/05
- 02/18: gnu: lepton-eda: Switch to Guile 3.0., guix-commits, 2021/05/05
- 07/18: gnu: Add libcerf., guix-commits, 2021/05/05
- 11/18: gnu: racket: Racket inherits racket-minimal, not vice versa., guix-commits, 2021/05/05
- 13/18: gnu: Add java-gson-2.8.6., guix-commits, 2021/05/05
- 12/18: gnu: racket: Add aditional mirrors., guix-commits, 2021/05/05
- 17/18: gnu: Add java-jline-reader., guix-commits, 2021/05/05
- 06/18: gnu: Add castget., guix-commits, 2021/05/05
- 01/18: swh: Adjust for compatibility with Guile 2.2's (web client).,
guix-commits <=
- 09/18: gnu: racket: Move to (gnu packages racket)., guix-commits, 2021/05/05
- 18/18: gnu: Add tla2tools., guix-commits, 2021/05/05
- 14/18: gnu: Add java-eclipse-xtext-xbase-lib., guix-commits, 2021/05/05
- 16/18: gnu: Add java-jline-terminal., guix-commits, 2021/05/05
- 03/18: cvs-download: Fix module exports, guix-commits, 2021/05/05
- 04/18: gnu: xboard: Set default engine to gnuchess., guix-commits, 2021/05/05
- 08/18: gnu: Add labplot., guix-commits, 2021/05/05
- 05/18: gnu: Add xmlsec-openssl., guix-commits, 2021/05/05
- 10/18: gnu: racket: Remove obsolete patch., guix-commits, 2021/05/05
- 15/18: gnu: Add java-eclipse-lsp4j packages., guix-commits, 2021/05/05