On Mon, Aug 31, 2009 at 20:14, Mackram Raydan<mackram@gmail.com> wrote:Confusingly, the argument to :request-dispatcher is something
> I have been trying to get a dispatcher to work with hunchentoot but I have
> been unable to do it at all. Specifically running the following line on the
> REPL (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4555
> :request-dispatcher (apply 'hunchentoot:create-prefix-dispatcher '("/"
> make-home-page)))) would result in an error appearing when i try to access
> the localhost:4555. The error I get is [2009-08-31 21:04:16 [ERROR]] Error
> while processing connection: The value MAKE-HOME-PAGE is not of type
> SEQUENCE.
completely different from what create-prefix-dispatcher creates. The
:request-dispatcher argument is only used when you do not want to use
the dispatcher/handler architecture of hunchentoot. It is a function
designator for a function that is called for each request to be
handled. This function needs to parse the request and call an
appropriate handler, in whatever fashion your architecture requires.
Contrasted to that, create-prefix-dispatcher is part of hunchentoot's
own dispatcher and handler architecture. If you want to use that,
you'll not supply a :request-dispatcher argument when you create the
acceptor, as the default will do the right thing.
-Hans
_______________________________________________
tbnl-devel site list
tbnl-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/tbnl-devel