users@jersey.java.net

Re: [Jersey] Content-Type calculation incorrect on 1.0.3

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Tue, 20 Jul 2010 13:13:34 +0200

Hello Tom,

can you please try Jersey 1.3? I know that Paul made some changes in
this area and its possible that your issue is already fixed.

Thanks,
Pavel

On 7/20/10 6:25 AM, Tom Davies wrote:
> I haven't checked on a more recent version, but on 1.0.3 a resource with the annotation:
>
> @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
>
> will produce a content type of application/xml given the accepts header text/html,application/xml;q=0.9,*/*
>
> @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
>
> produces application/json
>
> By my reading of http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 application/xml should end up with a q of 0.9, and application/json a q of 1 after matching */* in both cases.
>
> Tom
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>