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.
This commit is contained in:
interp 2002-11-05 21:32:58 +00:00
parent 47a60a26d3
commit 45a4c810a1
1 changed files with 8 additions and 6 deletions

View File

@ -4,9 +4,10 @@
(define (send-html/suspend html-tree-maker)
(send/suspend
(lambda (new-url)
(let ((html-page (servlet-XML->HTML #f (html-tree-maker new-url))))
(make-usual-html-response
(lambda (out options)
(servlet-XML->HTML out (html-tree-maker new-url)))))))
(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)
(let ((html-page (servlet-XML->HTML #f html-tree)))
(send (make-usual-html-response
(lambda (out options)
(servlet-XML->HTML out html-tree)))))
(display html-page out))))))
(define (make-usual-html-response writer-proc)
(make-response