From 1bf4ad2c41c91c36d7b685a40dbeccc2ee8399b3 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 7 Aug 2014 07:15:59 -0400 Subject: Render JSON directly to client port. * guix-web (render-json): Output to port instead of string. --- guix-web | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guix-web b/guix-web index 0b322e9..81595c1 100755 --- a/guix-web +++ b/guix-web @@ -70,8 +70,8 @@ (define (render-json json) (list '((content-type . (application/json))) - (with-output-to-string - (cut scm->json json)))) + (lambda (port) + (scm->json json port)))) (define (request-path-components request) (split-and-decode-uri-path (uri-path (request-uri request)))) -- cgit v1.2.3