This repository has been archived by the owner on Jan 28, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The HTTP RFC 7231 defines the q-value as “relative ‘weight’ to the preference”. The two examples provided in section 5.3.2 imply two different interpretations of what that means. The first interpretation the weight is relative to the quality in which the server can provide a specified format while in the second example the weight only indicates a relative preference. The JAX-RS specification interprets the q value and defines the qs value only as a sorting key to determine the preference over other formats in the same set.
I argue that following example included in RFC 7231 provides the better interpretation of the q-value and this would suggest a more powerful definition of the qs value:
By this interpretation a definition of qs would suggest itself by which qs is not merely a tertiary sorting criteria but an indicator of the quality in which a response in that format can be produced. So for example if the server can produce audio/basic; qs=0.1 and audio/extended; qs=1 the server should return audio/extended as after an 80% markdown in quality it is the best available format.
To achieve this, in Section 3.8 step 7 the secondary key for sorting M is defined as the product of q and qs and q is used as tertiary key, analogous changes have been made in section 3.7.2.