[hunchentoot-devel] *http-error-handler* behaviour
Edi Weitz
edi at agharta.de
Fri Nov 17 07:27:18 UTC 2006
On Fri, 17 Nov 2006 07:56:02 +0100, "Marijn Haverbeke" <marijnh at gmail.com> wrote:
[Please use the mailing list.]
> I hadn't seen aux-request-value yet -- that would definitely be
> better than a dynamic variable. But I'm still not crazy about the
> way the *http-error-handler* just kicks in when the headers are
> being sent. All the other stuff in my app neatly fetches an output
> stream, and then writes its body to it, but for non-200 pages the
> library just refuses to let me do this. (Which means I can't use my
> very nice function for filling and writing a template in this case.)
> Seems a bit arbitrary.
It was intended as a simple solution at a time when there was no
customized error handling at all:
http://common-lisp.net/pipermail/tbnl-devel/2005-March/000197.html
I still think it is OK as far as it is in line with the way "normal"
content is handled in Hunchentoot. The only real difference I can see
is that you can't write directly to a stream.
Why you can't use your nice function escapes me, though. You could
capture its output in a string stream, couldn't you?
If you come up with a solution that obviously improves the current
situation, I'd be happy to include your patches. Bonus points if the
new stuff is compatible with the old code. And note that a patch
which changes user-visible behaviour should include documentation as
well - I might otherwise reject it.
Cheers,
Edi.
More information about the Tbnl-devel
mailing list