summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-10-12 11:34:19 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-10-12 22:47:10 +0200
commitffe480e3de3713bac92079a173bc7e2ef48799bb (patch)
tree654d557f8771037738d9df52d141d5fa5a3eabec
parent44426c584f6d2bb10be538a6faf2bd2c63a0ad60 (diff)
client: allow responses without a content
-rw-r--r--po/disfluid.pot12
-rw-r--r--po/fr.po17
-rw-r--r--src/scm/webid-oidc/client/application.scm5
3 files changed, 18 insertions, 16 deletions
diff --git a/po/disfluid.pot b/po/disfluid.pot
index 4249dd2..b657e6d 100644
--- a/po/disfluid.pot
+++ b/po/disfluid.pot
@@ -641,32 +641,32 @@ msgid ""
"phrase) should be a string"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:472
+#: src/scm/webid-oidc/client/application.scm:473
msgid ""
"the etag (#:etag) should be a string or #f, the links (#:links) should be a "
"list of links, the content-type (#:content-type) should be a symbol or a "
"list whose first item is a symbol, and the content (#:content) should be a "
-"string or a bytevector"
+"string or a bytevector, or #f for responses without a content"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:508
+#: src/scm/webid-oidc/client/application.scm:509
msgid ""
"the desired links (#:desired-links) should be an alist from URI to alists, "
"the desired content-type (#:desired-content-type) should be a symbol, and "
"the desired content (#:desired-content) should be a string or a bytevector"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:592
+#: src/scm/webid-oidc/client/application.scm:593
#, scheme-format
msgid "Loading ~a..."
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:671
+#: src/scm/webid-oidc/client/application.scm:672
#, scheme-format
msgid "Updating ~a (expected ETag ~a)"
msgstr ""
-#: src/scm/webid-oidc/client/application.scm:718
+#: src/scm/webid-oidc/client/application.scm:719
#, scheme-format
msgid "Deleting ~a (expected ETag ~a)"
msgstr ""
diff --git a/po/fr.po b/po/fr.po
index be669ea..583ff79 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: webid-oidc 0.0.0\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
"POT-Creation-Date: 2021-10-12 22:45+0200\n"
-"PO-Revision-Date: 2021-10-12 22:45+0200\n"
+"PO-Revision-Date: 2021-10-12 22:46+0200\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French <vivien@planete-kraus.eu>\n"
"Language: fr\n"
@@ -696,19 +696,20 @@ msgstr ""
"le code d’erreur (#:code) doit être un entier et l’explication (#:reason-"
"phrase) doit être une chaîne de caractères"
-#: src/scm/webid-oidc/client/application.scm:472
+#: src/scm/webid-oidc/client/application.scm:473
msgid ""
"the etag (#:etag) should be a string or #f, the links (#:links) should be a "
"list of links, the content-type (#:content-type) should be a symbol or a "
"list whose first item is a symbol, and the content (#:content) should be a "
-"string or a bytevector"
+"string or a bytevector, or #f for responses without a content"
msgstr ""
"l’etag (#:etag) doit être une chaîne de caractères ou #f, les liens (#:"
"links) doivent être liste de liens, le type de contenu (#:content-type) doit "
"être un symbole ou une liste dont le premier élément est un symbole, et le "
-"contenu (#:content) doit être une chaîne de caractères ou un vecteur d’octets"
+"contenu (#:content) doit être une chaîne de caractères ou un vecteur "
+"d’octets, ou #f si la réponse n’a pas de contenu"
-#: src/scm/webid-oidc/client/application.scm:508
+#: src/scm/webid-oidc/client/application.scm:509
msgid ""
"the desired links (#:desired-links) should be an alist from URI to alists, "
"the desired content-type (#:desired-content-type) should be a symbol, and "
@@ -719,17 +720,17 @@ msgstr ""
"symbole, et le ccontenu désiré (#:desired-content-type) doit être unne "
"chaîne de caractères ou un vecteur d’octets"
-#: src/scm/webid-oidc/client/application.scm:592
+#: src/scm/webid-oidc/client/application.scm:593
#, scheme-format
msgid "Loading ~a..."
msgstr "Chargement de ~a…"
-#: src/scm/webid-oidc/client/application.scm:671
+#: src/scm/webid-oidc/client/application.scm:672
#, scheme-format
msgid "Updating ~a (expected ETag ~a)"
msgstr "Mise à jour de ~a (ETag attendu ~a)"
-#: src/scm/webid-oidc/client/application.scm:718
+#: src/scm/webid-oidc/client/application.scm:719
#, scheme-format
msgid "Deleting ~a (expected ETag ~a)"
msgstr "Suppression de ~a (ETag attendu ~a)"
diff --git a/src/scm/webid-oidc/client/application.scm b/src/scm/webid-oidc/client/application.scm
index bde0018..863cae9 100644
--- a/src/scm/webid-oidc/client/application.scm
+++ b/src/scm/webid-oidc/client/application.scm
@@ -462,14 +462,15 @@
(or (? symbol? content-type)
((? symbol? content-type) _ ...))
(or (? string? content)
- (? bytevector? content)))
+ (? bytevector? content)
+ (? not content)))
(slot-set! page 'etag etag)
(slot-set! page 'links links)
(slot-set! page 'content-type content-type)
(slot-set! page 'content content))
(else
(scm-error 'wrong-type-arg "make <error-page>"
- (G_ "the etag (#:etag) should be a string or #f, the links (#:links) should be a list of links, the content-type (#:content-type) should be a symbol or a list whose first item is a symbol, and the content (#:content) should be a string or a bytevector")
+ (G_ "the etag (#:etag) should be a string or #f, the links (#:links) should be a list of links, the content-type (#:content-type) should be a symbol or a list whose first item is a symbol, and the content (#:content) should be a string or a bytevector, or #f for responses without a content")
'()
(list etag links content-type content)))))))