coheigea commented on a change in pull request #684:
URL: https://github.com/apache/cxf/pull/684#discussion_r457309659
##########
File path:
rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
##########
@@ -42,18 +43,22 @@
public class NettyHttpClientPipelineFactory extends
ChannelInitializer<Channel> {
+ public static final String MAX_CONTENT_LENGTH =
"org.apache.cxf.transport.http.netty.aggregator.maxContentLength";
private static final Logger LOG =
LogUtils.getL7dLogger(NettyHttpClientPipelineFactory.class);
+
private final TLSClientParameters tlsClientParameters;
private final int readTimeout;
-
+ private final int maxContentLength;
+
public NettyHttpClientPipelineFactory(TLSClientParameters
clientParameters) {
this(clientParameters, 0);
}
public NettyHttpClientPipelineFactory(TLSClientParameters
clientParameters, int readTimeout) {
this.tlsClientParameters = clientParameters;
this.readTimeout = readTimeout;
+ this.maxContentLength =
SystemPropertyAction.getInteger(MAX_CONTENT_LENGTH, 1048576);
Review comment:
I think it would be better to configure this in the same way as for
readTimeout etc., by passing an int value through to this class, and in
NettyHttpConduit checking the CXF Message for the value, e.g. see:
https://github.com/apache/cxf/blob/b8e24192378aa2b9bd8110186673d8904f6237d5/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java#L617
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]