You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Billy Jaime Beltran (Jira)" <ji...@apache.org> on 2023/12/08 12:33:00 UTC
[jira] [Created] (CAMEL-20210) Narrow content-type with charset fails clientRequestValidation
Billy Jaime Beltran created CAMEL-20210:
-------------------------------------------
Summary: Narrow content-type with charset fails clientRequestValidation
Key: CAMEL-20210
URL: https://issues.apache.org/jira/browse/CAMEL-20210
Project: Camel
Issue Type: Bug
Components: camel-core
Affects Versions: 4.2.0
Reporter: Billy Jaime Beltran
Attachments: tCYuXsuHaeo9.png
We recently upgraded an application to latest camel stable and got an error report from consumers when submitting a charset parameter in the content type header.
Expected: a request with content-type header `application/xml; charset=utf-8` is correctly validated as part of a rest specification with `.consumes(MediaType.APPLICATION_XML_VALUE)`. We run with bindingmode.off
Actual: fails with 415 MediaType error
What changed?
In commit [https://github.com/apache/camel/commit/2ce60e76a5c8496c1468558e0b6d3043c4eb0eac] a change in client Request Validation was introduced which defaults validation to return false instead of true.
The charset parameter is part of the Content-Type superset and is not per se a MediaType. We expect setting the correct MediaType would lead to a validation of MediaType and not fail on an additional charset parameter.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)