dev@jsr311.java.net

Re: JSR311: don't understand ResponseBuilder.variants()

From: Bill Burke <bburke_at_redhat.com>
Date: Mon, 17 Mar 2008 11:18:59 -0400

I did find this:

http://www.ietf.org/rfc/rfc2295.txt

I don't know if it was ever accepted or prevalent. Any other
information would be helpful. Thanks.

Bill Burke wrote:
>
>
> Marc Hadley wrote:
>> On Feb 27, 2008, at 8:59 PM, Bill Burke wrote:
>>
>>> I don't understand why this method exists:
>>>
>>> ResponseBuilder.variants(List<Variant> variants);
>>>
>>> The Response has to choose what its Variant is doesn't it? I mean,
>>> the response MUST have a chosen content-type (for example).
>>>
>>> I thought variants were really for request processing, not the response.
>>>
>> That method is used by the implementation of Response.notAcceptable.
>> IIRC it is used to set the contents of the Vary header from the
>> supplied list.
>>
>
> I'm still confused on what ResponseBuilder.variants() is supposed to do.
> I looked into the Vary header and its return value. The value of the
> header should be what accept headers should be used to qualify a
> representational type.
>
> i.e.
>
> Vary: Accept, Accept-Language
>
> I can't find any reference to actual types, languages that are available
> in the response. From what I've read on Vary, it is really used for
> caching semantics and nothing really to do with 300 or 406 response codes.
>
>
> For response codes 300 (Multiple Choices) and 406 ("Not acceptable"),
> W3C says that the entity body returned *may* be a link to various
> representations, but the entity body is not specified by the specification.
>
> Can we remove ResponseBuilder.variants and notAcceptable(List<Variant>)
> or define exactly what the HTTP Response message should look like please?
>
> or point me to someplace that defines what this method is supposed to do.
>
> Thanks,
>
> Bill
>

-- 
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com