A MediatypeViewResultFormatter with supported media type text/html should handle text/html;q=0.7.
Ideally we would parse the quality value but as a minimum should change the matching logic to use string.contains:
var supportedMediaType = SupportedMediaTypes.Any(
mt => acceptTypes.Any(at => at.Contains(mt, StringComparison.OrdinalIgnoreCase)));
We also need to provide a default formatter or at least return a 415 (unsupported media type) if none of the formatters are matched.
A
MediatypeViewResultFormatterwith supported media typetext/htmlshould handletext/html;q=0.7.Ideally we would parse the quality value but as a minimum should change the matching logic to use string.contains:
We also need to provide a default formatter or at least return a 415 (unsupported media type) if none of the formatters are matched.