add comments explaining why seval-handler is buggy
This commit is contained in:
parent
06ec0f0293
commit
9fcfcf36f0
|
@ -47,14 +47,18 @@
|
||||||
|
|
||||||
|
|
||||||
(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
|
||||||
(time)
|
(time)
|
||||||
"text/html"
|
"text/html"
|
||||||
'()
|
'()
|
||||||
(make-reader-writer-body
|
(make-reader-writer-body
|
||||||
(lambda (iport oport options)
|
;; 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)
|
||||||
(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)
|
||||||
(with-tag oport head ()
|
(with-tag oport head ()
|
||||||
|
|
Loading…
Reference in New Issue