You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Xilai Dai (Jira)" <ji...@apache.org> on 2023/07/04 09:00:00 UTC

[jira] [Commented] (CAMEL-19512) SetHeader not working anymore with InputStreamCache type

    [ https://issues.apache.org/jira/browse/CAMEL-19512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739850#comment-17739850 ] 

Xilai Dai commented on CAMEL-19512:
-----------------------------------

Updated the test-setheader project and re-attached it.
The issue is not on simple language but on setHeader().
[~davsclaus], [~essobedo], Could you please re-check it with the steps in README.txt? 

> SetHeader not working anymore with InputStreamCache type
> --------------------------------------------------------
>
>                 Key: CAMEL-19512
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19512
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.20.3
>         Environment: JDK 11
>            Reporter: Xilai Dai
>            Priority: Minor
>         Attachments: test-setheader.zip
>
>
> 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:
> {code}
> 		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}");
> {code}
> 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.



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