Has any body tried to use acceptor-names in hunchentoot define-easy-handler?
I can only get the easy-handler to find the acceptor-name if I change
(find (acceptor-name *acceptor*) acceptor-names :test #'eq))
to
(find (acceptor-name *acceptor*) acceptor-names :test #'equal))
In the following function.
(defun dispatch-easy-handlers (request) "This is a dispatcher which returns the appropriate handler defined with DEFINE-EASY-HANDLER, if there is one." (loop for (uri acceptor-names easy-handler) in *easy-handler-alist* when (and (or (eq acceptor-names t) (find (acceptor-name *acceptor*) acceptor-names :test #'eq)) ....
As far as I have seen in my tests acceptor-names have to be strings(sequences) so changing eq to equal makes sense...
Or am I smoking my socks again?
On Wed, Oct 14, 2009 at 2:33 PM, Phil Marneweck zaries@global.co.za wrote:
As far as I have seen in my tests acceptor-names have to be strings(sequences) so changing eq to equal makes sense...
Maybe I'm missing something, but why do you think they have to be strings?
Edi.
Hi
Some where along the line when I tried to use acceptor-names for the first time I got a not of type sequence error and there I went and made the assumption that they had to be strings. I most likely fluffed something some where along the line.
I was wondering would it make sense to be able to to register the same uri more than once with *easy-handler-alist*. Then using the uri acceptor-names combination to select the appropriate function to serve the request. Or is there another mechanism to be able to re-use a uri.
Regards Phil
On Wed, 2009-10-14 at 23:43 +0200, Edi Weitz wrote:
On Wed, Oct 14, 2009 at 2:33 PM, Phil Marneweck zaries@global.co.za wrote:
As far as I have seen in my tests acceptor-names have to be strings(sequences) so changing eq to equal makes sense...
Maybe I'm missing something, but why do you think they have to be strings?
Edi.
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel