You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the produces annotation to distinguish between two XQuery functions that share the same path annotation, the RestXQ servlet does not handle qvalue preferences for multiple media types in the HTTP Accept header correctly.
For example, Firefox sends the following default header when a user makes a request (e.g. via the URL bar):
Using the two XQuery functions below as an example and assuming the Firefox Accept header above, the second function should be called by RestXQ, since "text/html" has a qvalue of 1 in the Accept header, but instead, the first function is called.
Why not just use the JAX-RS spec, 3.7.2 Request Matching step 3b?
Determining the best matching media types follows the general rule: n/m > n/* > /, i.e. a method that explicitly consumes the request media type or produces one of the requested media types is sorted before a method that consumes or produces /. Quality parameter values in the accept header are also considered such that methods that produce media types with a higher acceptable q-value are sorted ahead of those with a lower acceptable q-value (i.e. n/m;q=1.0 > n/m;q=0.7) - see section 14.1 of [4] for more details.
When using the
produces
annotation to distinguish between two XQuery functions that share the samepath
annotation, the RestXQ servlet does not handle qvalue preferences for multiple media types in the HTTP Accept header correctly.For example, Firefox sends the following default header when a user makes a request (e.g. via the URL bar):
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Using the two XQuery functions below as an example and assuming the Firefox Accept header above, the second function should be called by RestXQ, since "text/html" has a qvalue of 1 in the Accept header, but instead, the first function is called.
The text was updated successfully, but these errors were encountered: