[hunchentoot-devel] Issue with setting a dispatcher

Mackram Raydan mackram at gmail.com
Mon Aug 31 19:05:42 UTC 2009


Thank you so much Hans for your quick reply, that makes so much sense now
:).


Mackram Raydan

Website: www.trailoflight.net
"An invasion of armies can be resisted, but not an idea whose time has
come." Victor Hugo


On Mon, Aug 31, 2009 at 9:58 PM, Hans Hübner <hans.huebner at gmail.com> wrote:

> On Mon, Aug 31, 2009 at 20:14, Mackram Raydan<mackram at gmail.com> wrote:
> > 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.
>
> Confusingly, the argument to :request-dispatcher is something
> 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 at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20090831/25a84a1e/attachment.html>


More information about the Tbnl-devel mailing list