diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-08-07 07:13:10 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-07 07:13:10 -0400 |
commit | ee6448467162ba7f399f5e0adfc3412e3e00c1a7 (patch) | |
tree | 572c03784cae24009f8b8ac3581eb072035025dd | |
parent | 58d759eb8b1632ded5e05b82215b794ad45966b8 (diff) |
Render HTML directly to client port rather than to string.
* guix-web (render-html): Render to port.
-rwxr-xr-x | guix-web | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -64,11 +64,9 @@ (define (render-html sxml) (list '((content-type . (text/html))) - (string-append - "<!DOCTYPE html>\n" - (with-output-to-string - (lambda () - (sxml->xml sxml)))))) + (lambda (port) + (display "<!DOCTYPE html>" port) + (sxml->xml sxml port)))) (define (render-json json) (list '((content-type . (application/json))) |