Georgios, you got me into this problem and I've stolen a few more
minutes in order to understand what's wrong.
I had forgotten about the 'headers numeric' command which I never used
myself so I looked into it more closely.
I googled what PHP does in this case and found a page where it's
explained how to drive the protocol by means of the PHP header('...')
command. This approach doesn't trigger the webserver to traeat the error
using one of its internal handler, it just sends a status line to the
client. They explicitly say it must be the very first output command in
your page, which makes sense, because if you've already sent data over
the connection you have triggered the transmission of the headers and
the status line would have been sent already.
Rivet stores output in its custom channel buffer before it gets
actually sent, so it might be in principle possible to bail out from a
request processing and leave Apache in charge to treat the error code
with one of its handlers, thus returning the status line expected.
'headers numeric' set the 'status' field in the request_rec, so it's
something one could expect to get the trick done, but it doesn't. I have
to look into it (if Damon and David have a better insight they're
welcome to have their say). Personally I will when I'm back from
Germany.
It would be nice to know something more about your problem, because
from a distance I would say that having custom error messages is
perfectly OK, or even preferable to Apache default errors, if errors
occur at the application level.
-- Massimo
On 03.07.2012 10:53, Massimo Manghi wrote:
Hi Georgios
I don't think I know the answer then. Reproducing your attempt on my
machine lets Apache return a 200, therefore a normal completion, even
though 'headers numeric 500' is issued (is it the right HTTP header
name anyway? Doing it in this way is expected to trigger a 500 error
on the server?)
Apache will certainly return its standard error messages when an
internal abnormal condition occur that cannot be handled by Rivet.
More questions come up to my mind related to the error handling and
Rivet interaction with other Apache components. I definitely need
time
to investigate (and I'll be busy this week)
sorry, for the time being I can only suggest you build your own error
messages
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org