I think I have found a bug in the function add_any_filter_handle in util_filter.c. The problem occurs when I add a filter at level AP_FTYPE_PROTOCOL + 5 *before* net_time_filter and ap_http_filter are added - which are both at levels AP_FTYPE_PROTOCOL. When I do this, I find that while r->proto_input_filters is setup properly: (1)net_time_filter->(2)ap_http_filter->(3)My filter. However r->input_filters points directly to my filter - thus bypassing all other fiters before it. This is owing to the last two lines in add_any_filter_handle:
if (frec->ftype < AP_FTYPE_CONNECTION && (*r_filters == *c_filters)) { *r_filters = *p_filters; }
This is obviously a serious bug. I also think that this function should be code-reviewed in general because it might have other problems. If there aren't any objections on this mailing list (for a few days), then I'll go ahead and file a bug.
-regards, ss