Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.0.2, 4.1.0
-
None
-
Unknown
Description
In case Content-Type header has ";charset=UTF-8" suffix, camel-http component creates Content-Encoding: UTF-8 header which is invalid by RFC specification.
If you try to send request with Content-Encoding: UTF-8 to SAP systems for example, they will reject it due to invalid header.
YAML DSL to reproduce the issue:
- route: nodePrefixId: route-7e2 id: route-dafc from: uri: scheduler id: from-64dc parameters: name: scheduler steps: - setHeader: name: Content-Type expression: simple: expression: application/json;charset=UTF-8 id: simple-dc79 id: setHeader-2f26 - setBody: expression: simple: expression: |- { "some": "value" } id: simple-bfca id: setBody-243c - to: uri: http id: to-2cfa parameters: httpUri: >- 01het4h4zq3gvtecszbv5rpx3y00-4f92b8ba4ea1459ece69.requestinspector.com httpMethod: POST
Additional notes:
- If you remove ";charset=UTF-8" part from the Content-Type header, and call one more http request after the first one, it gets appended automatically for some reason, even if you remove Content-Type header and set it again manually (possible another bug) between two calls
- Same behavior is for the https traffic
Attachments
Attachments
Issue Links
- duplicates
-
CAMEL-20037 camel-http builds StringEntity with wrong contentEncoding
- Resolved
- links to