The send-reply function below is part of some code that transforms sexp's according to specified rules a-la-sxml from the scheme world.
My problem is that when I evaluate the let form on its own, it returns "<HTML></HTML>" as expected. However, when I request the page served by the easy-handler, I get the following condition.
I/O timeout reading #<SB-SYS:FD-STREAM for "a constant string" {B84B211}>
I'm using sbcl on debian with hunchentoot just asdf-intalled as a local package. Can anyone suggest why the let form would evaluate ok on its own but not inside the easy-handler?
Cheers, Andy
(defun send-reply (&optional s &rest fragments) "Output the fragments to the specified stream" (labels ((descend (fragments &optional result) (cond ((null fragments) result) ((not (car fragments)) (descend (cdr fragments) result)) ((null (car fragments)) (descend (cdr fragments) result)) ((eq t (car fragments)) (descend (cdr fragments) t)) ((consp (car fragments)) (descend (cdr fragments) (descend (car fragments) result))) ((functionp (car fragments)) (funcall (car fragments)) (descend (cdr fragments) t)) (t (format s "~a" (car fragments)) (descend (cdr fragments) t))))) (descend fragments)))
(define-easy-handler (test :uri "/test" :default-request-type :get) () (let ((out (with-output-to-string (s) (send-reply s '(#< HTML (#> "</" HTML #>)))))) out))
On Sat, 2 Jun 2007 21:40:16 +0100, "Andy Chambers" achambers.home@googlemail.com wrote:
The send-reply function below is part of some code that transforms sexp's according to specified rules a-la-sxml from the scheme world.
My problem is that when I evaluate the let form on its own, it returns "<HTML></HTML>" as expected. However, when I request the page served by the easy-handler, I get the following condition.
I/O timeout reading #<SB-SYS:FD-STREAM for "a constant string" {B84B211}>
I'm using sbcl on debian with hunchentoot just asdf-intalled as a local package. Can anyone suggest why the let form would evaluate ok on its own but not inside the easy-handler?
The handler looks OK to me, and I just tried it with LWW 5.0.2 where it works fine and the browser sees the expected result. I currently don't have an idea why this doesn't work in your setup, sorry.
Cheers, Edi.