Add HTTPD-INPUT-RESPONSE response values.
This commit is contained in:
parent
f99dbe3b99
commit
44322977fc
|
@ -167,10 +167,14 @@
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(let ((initial-req (parse-http-request sock options)))
|
(let ((initial-req (parse-http-request sock options)))
|
||||||
(let redirect-loop ((req initial-req))
|
(let redirect-loop ((req initial-req))
|
||||||
(let ((response ((httpd-options-request-handler options)
|
(let response-loop ((response ((httpd-options-request-handler options)
|
||||||
(http-url-path (request-url req))
|
(http-url-path (request-url req))
|
||||||
req)))
|
req)))
|
||||||
(cond
|
(cond
|
||||||
|
((input-response? response)
|
||||||
|
(response-loop
|
||||||
|
((input-response-body-maker response)
|
||||||
|
(socket:inport sock))))
|
||||||
((nph-response? response)
|
((nph-response? response)
|
||||||
(values req response))
|
(values req response))
|
||||||
((eq? (response-code response) (status-code redirect))
|
((eq? (response-code response) (status-code redirect))
|
||||||
|
|
|
@ -24,6 +24,11 @@
|
||||||
nph-response?
|
nph-response?
|
||||||
(body nph-response-body))
|
(body nph-response-body))
|
||||||
|
|
||||||
|
(define-record-type http-input-response :http-input-response
|
||||||
|
(make-input-response body-maker)
|
||||||
|
input-response?
|
||||||
|
(body-maker input-response-body-maker))
|
||||||
|
|
||||||
(define-record-type http-writer-body :http-writer-body
|
(define-record-type http-writer-body :http-writer-body
|
||||||
(make-writer-body proc)
|
(make-writer-body proc)
|
||||||
writer-body?
|
writer-body?
|
||||||
|
|
|
@ -284,6 +284,9 @@
|
||||||
make-nph-response nph-response?
|
make-nph-response nph-response?
|
||||||
nph-response-body
|
nph-response-body
|
||||||
|
|
||||||
|
make-input-response input-response?
|
||||||
|
input-response-body-maker
|
||||||
|
|
||||||
make-writer-body writer-body?
|
make-writer-body writer-body?
|
||||||
make-reader-writer-body reader-writer-body?
|
make-reader-writer-body reader-writer-body?
|
||||||
make-redirect-body redirect-body? redirect-body-location
|
make-redirect-body redirect-body? redirect-body-location
|
||||||
|
|
Loading…
Reference in New Issue