httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: [PATCH] filtering and canned error responses
Date Tue, 05 Sep 2000 17:48:29 GMT
On Tue, 5 Sep 2000, Rodent of Unusual Size wrote:

> wrote:
> > 
> > Yes, I am serious, and your previous example IMHO proves that I am
> > correct.  If we have a filter that converts from HTML to WML, then
> > we want the error page to go through that filter.
> I agree with the second sentence, but not necessarily with the
> first.  I do not yet see a compelling reason to implement
> error messages as filters.

Well, this is where things start to get a little complicated, because we
have decided to distinguish between content generators and content
filters.  All of our generators are implemented as handler functions,
while filters are obviously implemented as filters.  What are error
messages?  Obviously, they are generated content, but they can't really be
implemented as handlers, because we are past the handler phase.  So, this
leaves us with two options.

1)  A filter that soaks up input and replaces it with the error page.
2)  A completely separate function that co-opts the request processing,
and sets up a new filter stack.

Option 1 makes sense to me, because we are already processing
filters.  The error handler filter can insert it's own filters, and
processing can continue as normal.  This also means we don't shortcut the
original handler.

Option 2 is somewhat similar to what we are doing now.  Basically,
currently a handler calls ap_die, which does the right thing on an
error.  We could modify ap_send_error_response to setup a filter stack and
send the response down the new stack.

This original patch removed all filter from error response pages.  I
definately disagree with that concept.  I think error pages do need to be
filtered.  How they are filtered is what this discussion seems to have
morphed into today.  I personally like option #1, because we don't have to
interrupt a handler and tear down a filter stack to make it work.  We just
throw a new filter in and continue.  Option #2 means we have to tear down
the current filter stack, and interrupt the current handler before we can
send the response.

I'm not tied to option 1, it just made sense to me.  I am tied to having
error pages be filtered.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message