davsclaus commented on code in PR #26892:
URL: https://github.com/apache/camel/pull/26892#discussion_r4112510111
##########
core/camel-util/src/main/java/org/apache/camel/util/IOHelper.java:
##########
@@ -266,7 +269,7 @@ public static int copy(
// flush at end, if we didn't do it during the writing
output.flush();
}
- return total;
+ return (int) Math.min(total, Integer.MAX_VALUE);
Review Comment:
Non-blocking: `DefaultHttpBinding.copyStream` (camel-http-common) returns
this value and passes it to `response.setContentLength(len)`. For a non-chunked
response over 2 GiB that is now `Integer.MAX_VALUE` rather than negative. Both
are wrong, so a follow-up to use the stream's long length with
`setContentLengthLong` would be good.
--
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]