Add SEND-HTML-STRING, ../SUSPEND, ../FINISH
This commit is contained in:
parent
b1e0c7df54
commit
df8ea46a27
|
@ -2,6 +2,8 @@
|
|||
;;; of pure string.
|
||||
;;; Copyright 2002,2003, Andreas Bernauer
|
||||
|
||||
|
||||
;; Send surflet-sxml lists as HTML
|
||||
(define (send-html/suspend html-tree-maker)
|
||||
(send/suspend
|
||||
(lambda (new-url)
|
||||
|
@ -10,14 +12,31 @@
|
|||
surflet-sxml-rules)))))
|
||||
|
||||
(define (send-html/finish html-tree)
|
||||
(do-sending send/finish html-tree))
|
||||
(do-html-sending send/finish html-tree))
|
||||
|
||||
(define (send-html html-tree)
|
||||
(do-sending send html-tree))
|
||||
(do-html-sending send html-tree))
|
||||
|
||||
(define (do-sending send html-tree)
|
||||
(send (make-usual-html-response
|
||||
(sxml->string html-tree surflet-sxml-rules))))
|
||||
;; Semd strings as HTML
|
||||
(define (send-html-string/suspend html-string-maker)
|
||||
(send/suspend
|
||||
(lambda (new-url)
|
||||
(make-usual-html-response
|
||||
(html-string-maker new-url)))))
|
||||
|
||||
(define (send-html-string/finish html-string)
|
||||
(do-html-string-sending send/finish html-string))
|
||||
|
||||
(define (send-html-string html-string)
|
||||
(do-html-string-sending send html-string))
|
||||
|
||||
;; Helping functions
|
||||
(define (do-html-sending sender html-tree)
|
||||
(sender (make-usual-html-response
|
||||
(sxml->string html-tree surflet-sxml-rules))))
|
||||
|
||||
(define (do-html-string-sending sender html-string)
|
||||
(sender (make-usual-html-response html-string)))
|
||||
|
||||
;; This is not for public, as we add the no-cache header that is
|
||||
;; needed for SUrflets.
|
||||
|
|
Loading…
Reference in New Issue