Graham Leggett wrote:
>
> Greg Stein wrote:
>
> > If filter types are equal, then order is dependent upon insertion, which
> > falls back to the insert_filter ordering.
> >
> > So... you can correct your filtering ordering by adjusting its type and
> > inserting it whenever, or you can have the same type as the core filters and
> > just make yourself run before the core filters.
>
> But as Ryan pointed out, and as the code shows the HTTP_HEADER filter is
> added before the insert_filter hook, so it's now impossible to add
> AP_FTYPE_HTTP_HEADER filters that do anything.
>
> I posted a patch to fix this.
>
> > I'd say make your insert_filter hook APR_HOOK_MIDDLE and use
> > AP_FTYPE_HTTP_HEADER - 1 for the type. Then it will run just before the
> > HTTP_HEADER filters.
>
> So adding a -1 will place the filter before the last filter? What if
> someone else tried to add an AP_FTYPE_HTTP_HEADER filter in another
> module without a -1? Now it would no longer work, and it would not be
> clear as to why. In addition, AP_FTYPE_HTTP_HEADER filter would have to
> work differently to the other filter types.
Seems to me that filters need the same kind of predecessor/successor
logic that hooks have.
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff