dev@jersey.java.net

RE: [Jersey][WebDAV] Different handling of lax=true

From: Markus KARG <markus.karg_at_gmx.net>
Date: Wed, 14 Jan 2009 20:58:28 +0100

Well... Filters sounds good but actually (maybe I am blind) I have not seen
something like that in the JAX-RS specification...?

> -----Original Message-----
> From: Paul.Sandoz_at_Sun.COM [mailto:Paul.Sandoz_at_Sun.COM]
> Sent: Mittwoch, 14. Januar 2009 11:50
> To: dev_at_jersey.dev.java.net
> Subject: Re: [Jersey][WebDAV] Different handling of lax=true
>
>
> On Jan 13, 2009, at 8:08 PM, Markus KARG wrote:
>
> > Paul,
> >
> >>> So to keep my application working with clients not sending any
> >>> Content-Type,
> >>> I have to manually lookup the default JAXB provider and give it a
> >>> fake MIME
> >>> type, right? So I'll do that...
> >>
> >> You can write your own JAXB message body readers/writers to accept
> >> any
> >> media type and override the default behaviour, like i showed in a
> >> very
> >> simple example leveraging a Jersey helper class.
> >
> > I know that I can do that by in what way would that be better than
> > giving a
> > fake MIME to the default body reader?
> >
>
> Which is better for the users?
>
> Another solution is to have a container request filter that normalizes
> the request into some "standard form". So it could add a content type
> header for a particular WebDAV method if the request entity is known
> to be of a particular media type. Filters are quite useful in this
> respect to normalize requests from particular clients (e.g. looking at
> the Agent header)
>
> Paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: dev-help_at_jersey.dev.java.net