[jax-rs-spec users] [jsr339-experts] Re: getAcceptableMediaTypes() should return empty list

From: Bill Burke <>
Date: Thu, 09 May 2013 02:45:18 -0400

On 5/8/2013 6:10 PM, Jan Algermissen wrote:
> On 08.05.2013, at 23:54, Bill Burke <> wrote:
>> I'm looking at:
>> com.sun.ts.tests.jaxrs.api.client.webtarget.JAXRSClient.requestNoArgTest();
>> It seems that it expects ClientRequestContext.getAcceptableMediaTypes() to return "*/*" by default if there is no Accept header. Not sure I agree with this. The Javadoc says it returns the *requested* media types, i.e., what you specified in an Accept header. If there is no accept header,
> " A request without any Accept header field implies that the user agent
> will accept any media type in response." .... aka */*

Correct, so getAcceptableMediaTypes() should return an empty list as no
specific media type was requested.

Bill Burke
JBoss, a division of Red Hat