add comment explaining why the concept of http-reader-writer-body

(which is used by the seval-handler only) doesn't work
This commit is contained in:
vibr 2005-04-14 15:18:54 +00:00
parent 8e7e071db2
commit db826a9c1f
2 changed files with 14 additions and 1 deletions

View File

@ -46,6 +46,15 @@
writer-body? writer-body?
(proc writer-body-proc)) (proc writer-body-proc))
;; the concept of http-reader-writer-body doesn't work: status-line
;; and headers of the response (i.e. the whole http-response record)
;; have to be built _before_ we have seen the entity-body of the
;; request. (Not until display-http-body hands over the iport to
;; reader-writer-body the entity-body can be read in). If the
;; entity-body is erroneous or if we encounter a server internal error
;; while reading in the entity-body we are not able to send an
;; appropriate response. (At that point of time we already sent
;; status-line and response-headers!)
(define-record-type http-reader-writer-body :http-reader-writer-body (define-record-type http-reader-writer-body :http-reader-writer-body
(make-reader-writer-body proc) (make-reader-writer-body proc)
reader-writer-body? reader-writer-body?

View File

@ -9,6 +9,10 @@
;;; This is really just an handler example demonstrating how to upload code ;;; This is really just an handler example demonstrating how to upload code
;;; into the server. ;;; into the server.
;;; Besides, this handler has always been broken because it makes use
;;; of the concept of http-reader-writer-body which is broken
;;; itself. See response.scm.
;;; (do/timeout secs thunk) ;;; (do/timeout secs thunk)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Run THUNK, and gun it down if it hasn't finished in SECS seconds. ;;; Run THUNK, and gun it down if it hasn't finished in SECS seconds.
@ -54,7 +58,7 @@
(time) (time)
"text/html" "text/html"
'() '()
(make-reader-writer-body (make-reader-writer-body ;; see response.scm for an explanation why the concept of http-reader-writer-body doesn't work
(lambda (iport oport options) (lambda (iport oport options)
(with-fatal-error-handler (with-fatal-error-handler