httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject Re: Reporting errors from filters
Date Fri, 26 Jan 2001 20:23:09 GMT
> This issue has come up before, but we never dealt with it.  We need to
> deal with it now though.  Filters must have a way to actually report a
> specific error to a handler, so that the server can report
> errors.  Currently, the filters are supposed to return an HTTP error value
> (at least that is the current design, but not implementation), but we
> don't implement that well.

Do you mean report errors for the error_log or for an HTTP error response?
I think the former, since we are already in mid-stream of the response
at that stage.

> One of the problems, is that ap_r* returns an int, but those functions are
> setup to return either -1 or the number of bytes written.  But, that
> doesn't work for filters.

Why not record the error in the ap_r* functions?

> I propose that we have ap_r* return an HTTP status code, so that filters
> can return an HTTP status code, and we can get good errors from the
> filter.

The problem is that filter errors are not going to be HTTP errors,
unless we are talking about the input filters.  Wouldn't it be easier
to register a function pointer within the filter object that can
be called when an error occurs?


View raw message