[ 
https://issues.apache.org/jira/browse/CXF-4504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035445#comment-16035445
 ] 

Victor Gonzales edited comment on CXF-4504 at 6/2/17 9:25 PM:
--------------------------------------------------------------

I actually just ran into this problem again. Our client has started sending a 
Content-Type header with the charset value set to "UTF-8". I've coded a 
workaround using a custom interceptor to scrub the quotes before the 
{{MediaTypeHeaderProvider}} does its thing. Is this the best solution, or might 
something be done similar to CXF-7320?
 Thanks.
We are on the 3.0.* version.


was (Author: vigoca):
I actually just ran into this problem again. Our client has started sending a 
Content-Type header with the charset value set to "UTF-8". I've coded a 
workaround using a custom interceptor to scrub the quotes before the 
{{MediaTypeHeaderProvider}} does its thing. Is this the best solution, or might 
something be done similar to CXF-7320?
 Thanks.

> MediaTypeHeaderProvider stores parameter values of Content-Type header as 
> quoted strings if they're quoted in the header
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-4504
>                 URL: https://issues.apache.org/jira/browse/CXF-4504
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.3.1
>            Reporter: Michal Gajdos
>            Assignee: Sergey Beryozkin
>
> If parameters of {{Content-Type}} header are quoted (e.g. boundary) then the 
> whole quoted string is stored as a parameter value in {{MediaType}} instance.
> Example:
> Parsing the following header:
> {{code}}
> Content-Type: multipart/form-data;boundary="MrmiiyyJEqRYcIJyun5tMVIz70NuQ_nfD"
> {{code}}
> causes the {{boundary}} parameter in {{MediaType}} instance to have value 
> {{"MrmiiyyJEqRYcIJyun5tMVIz70NuQ_nfD"}} instead of 
> {{MrmiiyyJEqRYcIJyun5tMVIz70NuQ_nfD}}.
> This is a problem when an application with both CXF and Jersey is deployed on 
> a server. If {{RuntimeDelegate}} from CXF is used in Jersey application 
> {{MediaTypeHeaderProvider}} may create a {{MediaType}} instance (when working 
> with multipart) Jersey is not able to work with (because of the quoted 
> boundary value).
> For more details see: http://java.net/jira/browse/JERSEY-1420



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to