Details
Description
org.apache.cxf.jaxrs.impl.RequestImpl
******
public Variant selectVariant(List<Variant> vars) throws IllegalArgumentException {
if (vars == null || vars.isEmpty())
MediaType inMediaType = headers.getMediaType();
Locale inLang = headers.getLanguage();
String inEnc = headers.getRequestHeaders().getFirst(HttpHeaders.CONTENT_ENCODING);
.....
}
******
In order to select the correct variant (conneg), Accept-* headers should be used, therefore headers.getAcceptableMediaTypes(), headers.getAcceptableLanguages() and headers.getRequestHeaders().getFirst(ACCEPT_ENCODING) should be used instead of headers.getMediaType(), headers.getLanguage() and headers.getRequestHeaders().getFirst(HttpHeaders.CONTENT_ENCODING).