summaryrefslogtreecommitdiff
path: root/src/scm/webid-oidc/hello-world.scm
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2021-08-13 00:47:33 +0200
committerVivien Kraus <vivien@planete-kraus.eu>2021-08-13 02:00:31 +0200
commitd48941a18ab6765a849641bcf506a69634693db3 (patch)
tree319c7102c6daa8aee9e76511fcfe40fb21fbbf6c /src/scm/webid-oidc/hello-world.scm
parent438e1e60af11948ce9ed6b8349eb0412517fd3f8 (diff)
Hello: fix format string
Diffstat (limited to 'src/scm/webid-oidc/hello-world.scm')
-rw-r--r--src/scm/webid-oidc/hello-world.scm22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/scm/webid-oidc/hello-world.scm b/src/scm/webid-oidc/hello-world.scm
index 0451ee9..98b4703 100644
--- a/src/scm/webid-oidc/hello-world.scm
+++ b/src/scm/webid-oidc/hello-world.scm
@@ -41,15 +41,17 @@
(body
,(sxml-match
(xml->sxml
- (W_ (format #f (W_ "<h1>Hello, ~a!</h1>")
- (uri->string id))
- (sxml->xml
- `(a (@ (href ,(uri->string id)))
- ,(uri->string id)))))
+ (format #f (W_ "<h1>Hello, ~a!</h1>")
+ (uri->string id)
+ (with-output-to-string
+ (lambda ()
+ (sxml->xml
+ `(a (@ (href ,(uri->string id)))
+ ,(uri->string id)))))))
((*TOP* ,title) title))
,(sxml-match
(xml->sxml
- (W_ (format #f (W_ "<p>The client is compatible with Solid.</p>"))))
+ (format #f (W_ "<p>The client is compatible with Solid.</p>")))
((*TOP* ,p) p))))))
(define-public (main)
@@ -166,11 +168,11 @@ Options:
(body
,(sxml-match
(xml->sxml
- (W_ (format #f "<h1>Please authenticate</h1>")))
+ (format #f (W_ "<h1>Please authenticate</h1>")))
((*TOP* ,title) title))
,(sxml-match
(xml->sxml
- (W_ (format #f "<p>This page requires authentication with Solid.</p>")))
+ (format #f (W_ "<p>This page requires authentication with Solid.</p>")))
((*TOP* ,p) p)))))))))))
(values
(build-response #:code 405
@@ -186,11 +188,11 @@ Options:
(body
,(sxml-match
(xml->sxml
- (W_ (format #f "<h1>Method not allowed</h1>")))
+ (format #f (W_ "<h1>Method not allowed</h1>")))
((*TOP* ,title) title))
,(sxml-match
(xml->sxml
- (W_ (format #f "<p>You can only use the <emph>GET</emph> method on this resource.</p>")))
+ (format #f (W_ "<p>You can only use the <emph>GET</emph> method on this resource.</p>")))
((*TOP* ,p) p))))))))))))))
(install-suspendable-ports!)
(run-server handler 'http (list #:port (string->number port-string))))))))))