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

Aniket Jadhav commented on CAMEL-22415:
---------------------------------------

[~squakez] one more thing: for charset first preference is given to 
[Exchange|https://github.com/apache/camel/blob/0321fd79a129b20fc83895e2608aae9dd96e1a83/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java#L769].
 shouldn't it be to "Content-Type" ?

and setting CamelCharsetName  to null requires  extra overhead as it will cause 
issues in further processing of exchange, so need extra handling to preserve it 
in some other exchange property and resetting it after http call.

> camel-http Changes Content-type while Building StringEntity  
> -------------------------------------------------------------
>
>                 Key: CAMEL-22415
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22415
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-http
>    Affects Versions: 4.10.5
>            Reporter: Aniket Jadhav
>            Priority: Major
>
> In 
> [HttpProducer.java|https://github.com/apache/camel/blob/0321fd79a129b20fc83895e2608aae9dd96e1a83/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java#L780]
>  Content-Type is getting modified it appends "charset".
> It creates problem  when some backend http servers doesn't accept "charset" 
> in Content-Type and return 500 error. 
> If request payload needs to be encoded with specific charset then it must be 
> passed  by caller only in a Content-Type Header and should not be modified in 
> [HttpProducer|https://github.com/apache/camel/blob/0321fd79a129b20fc83895e2608aae9dd96e1a83/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java#L780].
> As there is no other way to get it working for above mentioned case where 
> backend http servers doesn't accept "charset"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to