On Nov 14, 2011, at 9:34 AM, Santiago Pericas-Geertsen wrote:
> On Nov 11, 2011, at 7:08 PM, Bill Burke wrote:
>
>> What is the usecase for a pre-match filter? It just seems there's very little you can do before you know what resource(class/method) the http request is bound to.
>
> Essentially anything that updates the input to the matching algorithm. The canonical example is a filter that overrides the HTTP method, e.g. using X-HTTP-Method-Override (quite popular given that a lot of routers drop non-GET/POST requests).
Another example I recently came across is patching some ugly Accept headers generated by certain tools. Even with support for the qs parameter during matching, it was impossible to get the desired behavior without patching that header.
-- Santiago