Claus Ibsen created CAMEL-26063:
-----------------------------------

             Summary: camel-vertx-http - the CamelHttpMethod header overrides 
the httpMethod option
                 Key: CAMEL-26063
                 URL: https://issues.apache.org/jira/browse/CAMEL-26063
             Project: Camel
          Issue Type: Bug
          Components: camel-vertx-http
    Affects Versions: 4.18.0, 4.22.0, 4.23.0
            Reporter: Claus Ibsen
             Fix For: 4.24.0


The {{httpMethod}} option says "The HttpMethod header cannot override this 
option if set", and camel-http works that way: the option of the endpoint wins, 
then the {{CamelHttpMethod}} header, then GET with a query string and POST with 
a body ({{HttpMethodHelper.createMethod}}). camel-vertx-http reads the header 
first, with the option only as its default ({{DefaultVertxHttpBinding}}, main 
5aac7df76b83, line 59). So a {{CamelHttpMethod}} header on the message, such as 
the one an HTTP consumer sets to the method of the request it received, 
overrides the method the endpoint is configured with.

Found while adding the catalog body types of vertx-http (CAMEL-24961).

*Proposed change*: choose the method as camel-http does: the httpMethod option, 
then the header, then GET when there is a query string, POST when there is a 
body, else GET; note it in the upgrade guide, as a route that relied on the 
header over the option changes.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to