jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Proposal for Pre-Match Filters

From: Markus KARG <markus_at_headcrashing.eu>
Date: Sat, 12 Nov 2011 17:57:58 +0100

We are currently applying a pre-match filter which is implemented as a
Servlet filter. It filters ANY request and response of our WebDAV service.
The reason is that it provides a compatiblity view for Microsoft clients.
Those clients have lots of bugs and constraints which we do not want to add
into the service itself. As the bugs and constraints are not related to any
resource, the filter acts upon ANY request and response. In fact, the filter
must even change the request's URI in some cases, as for example Microsoft
clients invoke some methods upon false URIs. Currently we do not change the
URI but the filter directly answers those requests. But our target is to
change the filter as soon as JAX-RS 2.0 is published, so it will instead
route to the resource, but to a different URI.

> -----Original Message-----
> From: Bill Burke [mailto:bburke_at_redhat.com]
> Sent: Samstag, 12. November 2011 01:09
> To: jsr339-experts_at_jax-rs-spec.java.net
> Subject: [jsr339-experts] Re: Proposal for Pre-Match Filters
>
> 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.
>
> On 11/8/11 11:52 AM, Santiago Pericas-Geertsen wrote:
> > Hello Experts,
> >
> > A new proposal to support pre-match filters is ready for review [1].
> > The wiki includes a couple of other minor changes to simplify the
> API.
> > Namely, making @GlobalBinding the default (and dropping it) as well
> as
> > a new injectable type ResourceInfo.
> >
> > -- Santiago
> >
> > [1] http://java.net/projects/jax-rs-spec/pages/PreMatchingFilters
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com