diff --git a/scheme/httpd/seval.scm b/scheme/httpd/seval.scm index a3ae9b0..a43d551 100644 --- a/scheme/httpd/seval.scm +++ b/scheme/httpd/seval.scm @@ -68,7 +68,8 @@ (with-tag oport PRE () (newline oport) (force-output oport); In case we're gunned down. - (eval-safely sexp))) + (with-current-output-port oport + (eval-safely sexp)))) ;; Pretty-print the returned value(s). (emit-header oport 2 "Return value(s)") @@ -102,3 +103,8 @@ "Seval sexp: ~s" s) (read (make-string-input-port s))))) (else (error "No `Content-length:' field in POST request.")))) + +(define (get-header headers tag) + (cond + ((assq tag headers) => cdr) + (else #f))) \ No newline at end of file