Details
Description
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.
Also, if resource is set on the URI, it will ignore any expressions from header despite allowTemplateFromHeader, unless it was set on the first exchange, in which case it will be used for all exchanges, even those without the header set.
Attachments
Issue Links
- links to