Forum OpenACS Q&A: One more question about filter

Posted by Ke Wang on
I want to use filter to do some tracing work. But I found if the
preauth filter fails, it will go on to run the trace filters for that
page. So you cannot differ between visited page and rejected page. Is
there any solution to this? Except writing this page's URL to some
table specifically inside the page's source code.


Posted by Jerry Asher on

Try setting a global variable in the preauth filter and checking on that variable in your trace filter. I believe that should work.

You can also try the mung-the-header hack. Try something like this in your preauth:

ns_set put [ns_conn headers] x-rejected yes

And then check for that header in your trace.