users@jsr311.java.net

Re: q-value support (was Re: MediaType.isComaptible)

From: Reto Bachmann-Gmür <reto_at_gmuer.ch>
Date: Tue, 19 Aug 2008 17:16:39 +0200

Marc Hadley wrote:
>
> For 1.0 we fix the q (or qs) value for methods and providers to 1.0 so
> the product is always the same as that specified in the Accept.
As the q-value is syntactically just an argument to the media-type it's
hard to forbid it. Would something like the following do?

"This specification does not define how server-side q-values are
handled, the algorithms described in this specification assume a q-value
of 1.0 for methods and providers, implementations MAY use server side
q-values to select the best available contents, if they to do the
interpretation of the Accept header SHOULD conform to the interpretation
provided by RFC 2616".

>
>> If multiple media-type result to the same q-value product the one that
>> is not produced by a provider provided by the implementation is used.
>>
> I don't understand, can you give an example.
This was an attempt to realize the second requirement of the following
assertion in the current spec:
"An implementation MUST support application-provided entity providers
and MUST use those in preference to its own pre-packaged providers when
either could handle the same request."

Reto