[
https://issues.apache.org/jira/browse/CAMEL-18967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
James Netherton resolved CAMEL-18967.
-------------------------------------
Fix Version/s: 3.18.6
Resolution: Fixed
> camel-platform-http-vertx: Improve handling of whether an HTTP request body
> is allowed or not
> ---------------------------------------------------------------------------------------------
>
> Key: CAMEL-18967
> URL: https://issues.apache.org/jira/browse/CAMEL-18967
> Project: Camel
> Issue Type: Improvement
> Components: camel-platform-http-vertx
> Reporter: James Netherton
> Assignee: James Netherton
> Priority: Major
> Fix For: 3.20.2, 3.21.0, 4.0, 3.18.6
>
>
> The way that camel-platform-http-vertx tries to determine whether a request
> can / should have a body is a little bit flawed.
> There is a HttpMethod enum which controls which HTTP method is allowed a body:
> https://github.com/apache/camel/blob/main/components/camel-platform-http/src/main/java/org/apache/camel/component/platform/http/spi/Method.java#L29-L38
> This is then checked in the platform-http consumer:
> https://github.com/apache/camel/blob/main/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpConsumer.java#L280
> The problem is that it's not in line with how Vert.x web works. It already
> has its own logic for this. If the request Content-Type is
> application/x-www-form-urlencoded, then only POST, PUT, PATCH or DELETE is
> allowed a body. Otherwise no restriction is applied.
> So I think we should drop checking with 'canHaveBody' and just let Vert.x do
> its own validation.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)