Force SEND/... calls in SEND/FINISH and SEND, too.

Rename STRING-OUT-PORT to BUFFER.
This commit is contained in:
interp 2003-01-21 10:36:49 +00:00
parent 94f127d3b1
commit 3c73d6a37f
1 changed files with 5 additions and 5 deletions

View File

@ -252,13 +252,13 @@
(define (send/finish response)
(delete-session! (instance-session-id))
(shift unused response))
(shift unused (make-surflet-response response)))
(define (send response)
(shift unsused response))
(shift unused (make-surflet-response response)))
(define (make-surflet-response response)
(let ((surflet-out-port (open-output-string))
(let ((buffer (open-output-string))
(surflet-in-port #f) ;; FIXME: no input-port available
(options #f)) ;; FIXME: No access to httpd-options :-(
(if (writer-body? (response-body response))
@ -266,7 +266,7 @@
;; Error-handler is already installed.
;; Force string-output to resolve all send/... calls.
(display-http-body (response-body response)
surflet-in-port surflet-out-port
surflet-in-port buffer
options)
;; Create write-out-response for webserver.
(make-response
@ -277,7 +277,7 @@
(response-extras response)
(make-writer-body
(lambda (out options)
(display (get-output-string surflet-out-port) out)))))
(display (get-output-string buffer) out)))))
(make-error-response (status-code bad-gateway) #f
"The surflet returned an invalid response object (no writer-body)."))))