summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-08-07 07:15:59 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-08-07 07:15:59 -0400
commit1bf4ad2c41c91c36d7b685a40dbeccc2ee8399b3 (patch)
treebb146cf5e684225856c722cfac22eae24afc1810
parentee6448467162ba7f399f5e0adfc3412e3e00c1a7 (diff)
Render JSON directly to client port.
* guix-web (render-json): Output to port instead of string.
-rwxr-xr-xguix-web4
1 files 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))))