add comments explaining why seval-handler is buggy

This commit is contained in:
vibr 2004-08-14 15:47:29 +00:00
parent 06ec0f0293
commit 9fcfcf36f0
1 changed files with 6 additions and 2 deletions

View File

@ -47,6 +47,7 @@
(define (seval path req) (define (seval path req)
;;bug: we make 200 response, no matter if the request contained a valid Content-length: header or not (see below)
(make-response (make-response
(status-code ok) (status-code ok)
#f #f
@ -54,6 +55,9 @@
"text/html" "text/html"
'() '()
(make-reader-writer-body (make-reader-writer-body
;; this procedure's body is not evaluated until display-http-body is called from sent-http-response.
;; this way the errors which are thrown by read-request-sexp for unvalid Content-length headers are syslogged
;; (and no body is written out at all), but we still have the 200 status-line.
(lambda (iport oport options) (lambda (iport oport options)
(let ((sexp (read-request-sexp req iport))) (let ((sexp (read-request-sexp req iport)))
(http-syslog (syslog-level debug) "read sexp: ~a" sexp) (http-syslog (syslog-level debug) "read sexp: ~a" sexp)