[tbnl-devel] Question about dispatchers and their actions

Stefan Scholl stesch at no-spoon.de
Fri Jul 23 13:10:26 UTC 2004


Hi!

I don't know. A dispatcher is a dispatcher. Its task is to find
the right handler for the request.

And a handler returning NIL indicates an error. TBNL should emit
an internal server error 500.


On the other hand: Internal server errors are a bad thing. Better
produce a 404 instead of an 500. The handler can't handle the
request? Let the handler report this if it's no real
problem/error. If no dispatcher is found and no handler "feels
fit" to handle the request, then a 404 is the right answer.

But I think it should be an exception to the rule. Let the
handler return _two_ values if he is sure that the reason for not
processing the request is no fatal error and dispatching should
continue.


Normal handlers just return a string or nil if they have a
problem. Handlers which are aware of the possibility that other
dispatchers could catch the request when they fail return
(values nil t)


Regards,
Stefan






More information about the Tbnl-devel mailing list