I have this Spring Java Configuration with several custom HttpMessageConverters:
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorParameter(true).
ignoreAcceptHeader(false).
useJaf(true).
defaultContentType(MediaType.TEXT_HTML).
mediaType("html", MediaType.TEXT__HTML).
mediaType("rdf", MediaTypes.RDFXML);
}
If I query this setup with Jena I get an error:
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers
Jena sends a request with this Accept header:
Accept: text/turtle,application/n-triples;q=0.9,application/rdf+xml;q=0.8,application/xml;q=0.7,/;q=0.5
To my understanding, application/rdf+xml
, should be returned by the config above. This works perfectly as long as the type with the highest value is configured. Why doesn't Spring fall back to the 0.8-valued application/rdf+xml
, because text/turtle
and application/n-triples
are not available?
Is there an option to activate that?