Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-19383

camel-jslt: allowTemplateFromHeader ignores header on subsequent exchanges

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.20.4, 4.0-M3
    • 3.20.6, 3.21.0, 4.0-RC1, 4.0.0
    • None
    • None
    • Unknown

    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

          Activity

            People

              Unassigned Unassigned
              jsz Jacek Szymański
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: