Jacek Szymański created CAMEL-19383:
---------------------------------------

             Summary: camel-jslt: allowTemplateFromHeader ignores header on 
subsequent exchanges
                 Key: CAMEL-19383
                 URL: https://issues.apache.org/jira/browse/CAMEL-19383
             Project: Camel
          Issue Type: Bug
    Affects Versions: 4.0-M3, 3.20.4
            Reporter: Jacek Szymański


When allowTemplateFromHeader is set, the endpoint will remember the first 
header expression that is set and use it for any subsequent exchange, even if 
it brings a different expression in its header.

That is:

{{template.sendBodyAndHeader("direct:start", TEST_BODY,}}
{{JsltConstants.HEADER_JSLT_STRING, ".foo");}}

{{template.sendBodyAndHeader("direct:start", TEST_BODY,}}
{{JsltConstants.HEADER_JSLT_STRING, ".bar");}}



will both use the expression .foo and the expression .bar will be ignored.



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

Reply via email to