restlet/restlet-framework-java — pull request #591 by adennie (2012-05-18 16:28:48+00:00)
Title: fix issue #559 (strict conneg should evaluate media type parameters)

1) Added argument "boolean ignoreParameters" to MediaType.includes(),
and the following logic:

if ignoreParameters is true, behave as before. Otherwise, loop
through the media type parameters. Consider media type A to
"include" media type B iff for each param name/value pair in A, B
contains the same name/value.

2) Added an includes(Metadata) method variation which implements the
original signature, which passes through to the modified method having
the new signature, supplying true for the 2nd argument and thus
maintaining the original behavior for callers of that method signature.

3) Replaced the implementation of
StrictConneg.scoreMediaType(MediaType mediaType) with code copied from
scoreMetadata(T, List>), modified slightly to pass false
for the new 2nd argument to MediaType.includes(). Thus under strict
content negotiation, media type parameters will be considered in the
inclusion test.