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

Benny Slater commented on CAMEL-15026:
--------------------------------------

I've tried with version 2.21.1, 2.21.5 (and 2.23.2.fuse-760030-redhat-00001 as 
we use Redhat Fuse), but I get exactly the same exception. 
All my camel dependencies was updated to the mentioned version not only core 
and http4.

> Camel throws exception on HHTP response Content-Type header with additional 
> info
> --------------------------------------------------------------------------------
>
>                 Key: CAMEL-15026
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15026
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http4
>    Affects Versions: 2.21.0
>            Reporter: Benny Slater
>            Priority: Major
>
> Camel throws an TypeConversionException when receiving a HTTP response, where 
> the Content-Type header includes extended information, e.g. version info.
> org.apache.http.headers - [CID=879adbb4-d406-40e7-8529-5a20427157bf] - 
> http-outgoing-0 << HTTP/1.1 400 Bad Request
> org.apache.http.headers - [CID=879adbb4-d406-40e7-8529-5a20427157bf] - 
> http-outgoing-0 << *Content-Type: application/json; charset=utf-8; v=1.0*
> ...
> org.apache.camel.TypeConversionException: Error during type conversion from 
> type: java.lang.String to the required type: java.lang.String with value 
> [Body is instance of java.io.InputStream] due utf-8; v=1.0
> ....
> Caused by: java.io.UnsupportedEncodingException: utf-8; v=1.0
>  at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:71)
> The exception throw is TypeConversionException and the response to the caller 
> of route will get a 404 error back, even though the original response code 
> was 400.
> It appears that Camel doesn't handle the ; v=1.0 part of the content-type 
> header.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to