claudio4j opened a new pull request, #31297:
URL: https://github.com/apache/camel/pull/31297

   ## Description
   
   When an SFTP consumer uses `streamDownload=true`, its message carries the 
live input stream in `CamelRemoteFileInputStream`. A `toV()` reply can inherit 
that header. While storing it, the variable repository asks for a stream cache 
without an exchange to manage its lifetime. The conversion throws, and the next 
processor can receive the lookup reply as its body even though the exchange 
reports success.
   
   The input stream converter now declines that conversion when there is no 
owning exchange. The variable repository keeps the original stream, so saving 
the header leaves it available for the SFTP consumer. If storing a receive 
variable fails for another reason, static and dynamic sends restore the 
original body and headers and propagate the failure on the exchange.
   
   [CAMEL-28071](https://issues.apache.org/jira/browse/CAMEL-28071)
   
   ## Verification
   
   - The stream-header regression test failed on the original code because the 
reply replaced the original body.
   - 248 targeted variable, stream-caching, and send-processor tests passed 
with the patch.
   - A loopback SFTP run with `streamDownload=true` preserved the file contents 
and stream header, stored the lookup rows, and produced no reactive-executor 
warning.
   
   - The full Maven reactor build was not run locally.
   
   AI-assisted contribution by OpenAI Codex on behalf of Claudio4j
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to