davsclaus commented on code in PR #30526:
URL: https://github.com/apache/camel/pull/30526#discussion_r4651598830
##########
components/camel-netty-http/src/main/java/org/apache/camel/component/netty/http/handlers/HttpServerChannelHandler.java:
##########
@@ -555,4 +592,94 @@ protected Exchange createExchange(ChannelHandlerContext
ctx, Object message) thr
return exchange;
}
+
+ /**
+ * A streamed reply that closes the body stream of the request with it.
The outbound streamer closes the reply once
+ * it is written, when the write fails, or when the connection is closed.
Everything else is the reply as built by
+ * the binding.
+ */
+ private static final class StreamedReply extends
OutboundStreamHttpResponse {
+ private final OutboundStreamHttpResponse reply;
+ private boolean closed;
+ private InputStream requestStream;
+
+ StreamedReply(OutboundStreamHttpResponse reply) {
+ super(InputStream.nullInputStream(), reply);
Review Comment:
Addressed in 36b196aa5200: `OutboundStreamHttpResponse` gets a protected
constructor that takes the status, headers and chunked input of another
response, so `StreamedReply` calls `super(reply)` and no longer allocates the
unused `HttpChunkedInput`. It now only overrides `close()` (to close the
request body stream with the reply) and drops the delegating overrides. The
netty-http stream and chunked tests pass (43, including the new ones of this
PR).
_Claude Code on behalf of davsclaus_
--
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]