From 9fcfcf36f0fed6ebc28c1c7eb0b50d183b2f40cd Mon Sep 17 00:00:00 2001 From: vibr Date: Sat, 14 Aug 2004 15:47:29 +0000 Subject: [PATCH] add comments explaining why seval-handler is buggy --- scheme/httpd/seval.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scheme/httpd/seval.scm b/scheme/httpd/seval.scm index b4d2803..496a884 100644 --- a/scheme/httpd/seval.scm +++ b/scheme/httpd/seval.scm @@ -47,14 +47,18 @@ (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 (status-code ok) #f (time) "text/html" '() - (make-reader-writer-body - (lambda (iport oport options) + (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) (let ((sexp (read-request-sexp req iport))) (http-syslog (syslog-level debug) "read sexp: ~a" sexp) (with-tag oport head ()