You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2014/10/09 10:17:34 UTC
[jira] [Resolved] (CAMEL-7886) Charset not correctly set from
content-type
[ https://issues.apache.org/jira/browse/CAMEL-7886?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-7886.
---------------------------------
Resolution: Fixed
Applied the patch into master, camel-2.14.x , camel-2.13.x and camel-2.12.x branches.
> Charset not correctly set from content-type
> -------------------------------------------
>
> Key: CAMEL-7886
> URL: https://issues.apache.org/jira/browse/CAMEL-7886
> Project: Camel
> Issue Type: Bug
> Components: camel-http4
> Affects Versions: 2.12.4, 2.13.2, 2.14.0
> Reporter: Benjamin Habegger
> Assignee: Willem Jiang
> Priority: Critical
> Fix For: 2.12.5, 2.13.3, 2.14.1, 2.15.0
>
>
> When a "Content-Type" header is explicitely set with charset attached before invoking the camel http4 component, the charset is not taken into account.
> This is because ContentType.create is invoked with the complete Content-Type when in fact it expects a mediaType.
> (see lines 414-416: camel-http4 version 2.14.0)
> if (contentTypeString != null) {
> contentType = ContentType.create(contentTypeString);
> }
> For example, if header is set to "application/json; charset=UTF-8" the contentType returned by ContentType.create(contentTypeString) is null.
> And therefore, further down (line 444) charset is not extracted even though it has been specified.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)