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

saksham commented on CAMEL-14959:
---------------------------------

The problem is because there are other requests which do no require the CSRF 
nonce, and in that case the encoding is used as ISO-8859-1 which is fine by us. 
But why while handling the response, the default charset is used as UTF-8. The 
default charset should be the same in both the cases. 

> Inconsistent behavior of default charset in StringEntity and 
> IOHelper.getCharsetFromContentType
> -----------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-14959
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14959
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http, camel-http4
>    Affects Versions: 2.23.1
>            Reporter: saksham
>            Priority: Major
>
> In our product, we invoke the Odata endpoint of a different service, it uses 
> an CSRF nonce. 
> So in one post requset, two thing happen, Fetch the CSRF nonce and Post the 
> actual request. 
> Here on processing the request of Fetch, it sets the charset from 
> IOHelper.getCharsetFromContentType. If there is no charset, then UTF-8 is set 
> to default. 
> Thus this charset gets put on the exchange object. and used further in the 
> post request. 
> But when we are creating a request entity. in HttpProducer.createRequestEntity
> The default charset it uses is ISO-8859-1 which is correct as per HTTP 1.1 
> standard. 



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

Reply via email to