cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Moroski (JIRA)" <>
Subject [jira] [Commented] (CXF-6997) Accept header doesn't correctly support multiple media ranges
Date Mon, 08 Aug 2016 13:05:20 GMT


Jeff Moroski commented on CXF-6997:

Gah, you're right.  I was getting my delimiters mixed up.

That value in the Accept header is actually built by multiple calls to {{org.apache.cxf.jaxrs.client.AbstractClient.accept(String...)}}

Our JaxRsDispatcherServlet.doService does additional error reporting and logging if JAX-RS
applications aren't currently registered (this is an OSGi environment), otherwise calls cxfServlet.service()
for the typical flow.  Our CxfServlet extends CXFServlet, and in the case of the service()
method, it is a pure passthrough, doing nothing but calling the super implementation.

> Accept header doesn't correctly support multiple media ranges
> -------------------------------------------------------------
>                 Key: CXF-6997
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.6
>            Reporter: Jeff Moroski
> An Accept value of {{application/*+xml,application/*+xml;version=25.0,application/*+xml;version=1.5}}
is valid according to [Section 5.3.2 of RFC 7231|],
but when a media range and no corresponding accept params exists anywhere but the end of the
value, the MediaTypeHeaderProvider fails to process the value correctly:
> {noformat}
> Server stack trace: java.lang.IllegalArgumentException: Invalid media type string: application/*+xml,application/*+xml;version=25.0,application/*+xml;version=1.5
> at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.internalValueOf(
> at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.valueOf(
> at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.fromString(
> at org.apache.cxf.jaxrs.impl.MediaTypeHeaderProvider.fromString(
> at
> {noformat}

This message was sent by Atlassian JIRA

View raw message