From 45a4c810a1a7a92b43f5ceeb09789f7cd97a537d Mon Sep 17 00:00:00 2001 From: interp Date: Tue, 5 Nov 2002 21:32:58 +0000 Subject: [PATCH] Create HTML page before creating response object. This enables the possibility to nest calls to the SEND-HTML/SUSPEND and similar, but disables the access to the HTTPD-OPTIONS (that wasn't granted anyway, currently). This makes the add.scm servlet working again. --- scheme/httpd/surflets/surflets.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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