-
Bug
-
Resolution: Done
-
Major
-
2.3.2.Final, 2.3.1
-
None
If a request contains Accept-Language: *,de;q=0 (I accept any language except German) and the only language my resource has is German, then the variant selected by selectVariant is still German.
List<Variant> variants = VariantListBuilder.newInstance().languages(Locale.GERMAN).build();
request.selectVariant(variants) // <-- returns the German variant, should return null
In fact, the documentation of selectVariant is vague enough to allow this behaviour, but it seems the implementation of org.jboss.resteasy.core.request.ServerDrivenNegotiation does try to return null if no variant is acceptable.