From ee6448467162ba7f399f5e0adfc3412e3e00c1a7 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 7 Aug 2014 07:13:10 -0400 Subject: Render HTML directly to client port rather than to string. * guix-web (render-html): Render to port. --- guix-web | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/guix-web b/guix-web index 6031122..0b322e9 100755 --- a/guix-web +++ b/guix-web @@ -64,11 +64,9 @@ (define (render-html sxml) (list '((content-type . (text/html))) - (string-append - "\n" - (with-output-to-string - (lambda () - (sxml->xml sxml)))))) + (lambda (port) + (display "" port) + (sxml->xml sxml port)))) (define (render-json json) (list '((content-type . (application/json))) -- cgit v1.2.3