diff --git a/scheme/httpd/surflets/surflets.scm b/scheme/httpd/surflets/surflets.scm index df190e7..1383e85 100644 --- a/scheme/httpd/surflets/surflets.scm +++ b/scheme/httpd/surflets/surflets.scm @@ -4,9 +4,10 @@ (define (send-html/suspend html-tree-maker) (send/suspend (lambda (new-url) - (make-usual-html-response - (lambda (out options) - (servlet-XML->HTML out (html-tree-maker new-url))))))) + (let ((html-page (servlet-XML->HTML #f (html-tree-maker new-url)))) + (make-usual-html-response + (lambda (out options) + (display html-page out))))))) (define (send-html/finish html-tree) (do-sending send/finish html-tree)) @@ -15,9 +16,10 @@ (do-sending send html-tree)) (define (do-sending send html-tree) - (send (make-usual-html-response - (lambda (out options) - (servlet-XML->HTML out html-tree))))) + (let ((html-page (servlet-XML->HTML #f html-tree))) + (send (make-usual-html-response + (lambda (out options) + (display html-page out)))))) (define (make-usual-html-response writer-proc) (make-response