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

SetHeader not working anymore with InputStreamCache type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Information Provided
    • 3.20.3
    • None
    • camel-core
    • None
    • JDK 11

    • Unknown

    Description

      It seems there is a regression from Camel 3.20.3 which is the SetHeader not working anymore with InputStreamCache type.

      Given that a simple route:

      		from("timer:cTimer_1" + "?period=" + 1 + "&repeatCount=" + 1 + "&delay=" + 1)
      		.setHeader("myheader1").constant("Hi")
      		.log(org.apache.camel.LoggingLevel.WARN, "MyRoute.cLog_1", "header myheader1 value is: ${header.myheader1}")
      		.setHeader("myheader2").constant(iscache1)
      		.log(org.apache.camel.LoggingLevel.WARN, "MyRoute.cLog_2", "header myheader2 value is: ${header.myheader2}")
      		.setBody().constant(iscache2)
      		.log(org.apache.camel.LoggingLevel.WARN, "MyRoute.cLog_3", "body value is: ${body}");
      

      the value of header.myheader2 is always null from Camel 3.20.3, whereas in Camel 3.20.2 or earlier version, it worked as expected.

      Attached a sample project for easily reproduce the issue.

      Attachments

        1. test-setheader.zip
          6 kB
          Xilai Dai

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              xldai Xilai Dai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: