This is Restlet 2.0.0:
public class FooServerResource extends ServerResource {
@Override
protected Representation doNegotiatedHandle() throws ResourceException {
for (Preference<MediaType> preference :
getRequest().getClientInfo().getAcceptedMediaTypes()) {
System.out.println("### PREF: " + preference);
}
return super.doNegotiatedHandle();
}
...
}
curl -v -H 'Accept: application/xhtml+xml,text/xml;q=0.9,text/plain;q=0.8'
...
Output:
### PREF: application/xhtml+xml:1.0
### PREF: text/xml:1.0
### PREF: text/plain:1.0
This is not just a cosmetic error, I can't get negotiation to work based on
quality levels.
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/Accepted-media-type-quality-is-always-1-0-tp5334856p5334856.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2637896