Force SEND/... calls in SEND/FINISH and SEND, too.
Rename STRING-OUT-PORT to BUFFER.
This commit is contained in:
parent
94f127d3b1
commit
3c73d6a37f
|
@ -252,13 +252,13 @@
|
||||||
|
|
||||||
(define (send/finish response)
|
(define (send/finish response)
|
||||||
(delete-session! (instance-session-id))
|
(delete-session! (instance-session-id))
|
||||||
(shift unused response))
|
(shift unused (make-surflet-response response)))
|
||||||
|
|
||||||
(define (send response)
|
(define (send response)
|
||||||
(shift unsused response))
|
(shift unused (make-surflet-response response)))
|
||||||
|
|
||||||
(define (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
|
(surflet-in-port #f) ;; FIXME: no input-port available
|
||||||
(options #f)) ;; FIXME: No access to httpd-options :-(
|
(options #f)) ;; FIXME: No access to httpd-options :-(
|
||||||
(if (writer-body? (response-body response))
|
(if (writer-body? (response-body response))
|
||||||
|
@ -266,7 +266,7 @@
|
||||||
;; Error-handler is already installed.
|
;; Error-handler is already installed.
|
||||||
;; Force string-output to resolve all send/... calls.
|
;; Force string-output to resolve all send/... calls.
|
||||||
(display-http-body (response-body response)
|
(display-http-body (response-body response)
|
||||||
surflet-in-port surflet-out-port
|
surflet-in-port buffer
|
||||||
options)
|
options)
|
||||||
;; Create write-out-response for webserver.
|
;; Create write-out-response for webserver.
|
||||||
(make-response
|
(make-response
|
||||||
|
@ -277,7 +277,7 @@
|
||||||
(response-extras response)
|
(response-extras response)
|
||||||
(make-writer-body
|
(make-writer-body
|
||||||
(lambda (out options)
|
(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
|
(make-error-response (status-code bad-gateway) #f
|
||||||
"The surflet returned an invalid response object (no writer-body)."))))
|
"The surflet returned an invalid response object (no writer-body)."))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue