Jostein Gogstad created CXF-6104:
------------------------------------
Summary: Support case insensitive mime types
Key: CXF-6104
URL: https://issues.apache.org/jira/browse/CXF-6104
Project: CXF
Issue Type: New Feature
Components: JAX-RS
Affects Versions: 3.0.2
Reporter: Jostein Gogstad
A request with header {code:none}Content-Type:
application/json;charset=UTF-8{code} will not match a method annotated with
{code:none}@Consumes("application/json; charset=utf-8"){code} This is
unfortunate since the former casing of "UTF-8" is used by several front-end
frameworks, for instance Google's [AngularJS
(ngResource)|https://docs.angularjs.org/api/ngResource/service/$resource], and
the latter casing is used several places by the Internet
([w3.org|http://www.w3.org/International/O-HTTP-charset.en.php] for example).
The "bug" is located here:
{code:java|title=org.apache.cxf.jaxrs.utils.JAXRSUtils#intersectMimeTypes(java.util.List<MediaType>,
java.util.List<MediaType>, boolean, boolean)}
if (value != null && !value.equals(entry.getValue())) {
{code}
should be
{code:java}
if (value != null &&
!value.equalsIgnoreCase(entry.getValue())) {
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)