diff options
Diffstat (limited to 'src/scm/webid-oidc')
-rw-r--r-- | src/scm/webid-oidc/hello-world.scm | 22 |
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)))))))))) |