On Sat, 25 Oct 2008 12:15:31 -0700, Carlo wrote:
> What is the simplest way to define handlers depending on the host name
> of the request?
>
> Carlo
(push (lambda (req)
(when (equalp (host req) "foo:4242")
(lambda () "hello!")))
*dispatch-table*)
This assumes that your server is running on port 4242, of course.
To check only the host name, use SPLIT-SEQUENCE or CL-PPCRE to
split at the colon.
Leslie