coheigea commented on a change in pull request #684:
URL: https://github.com/apache/cxf/pull/684#discussion_r458587539



##########
File path: 
rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpClientPipelineFactory.java
##########
@@ -44,16 +44,24 @@
 
     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(clientParameters, readTimeout, 1048576);

Review comment:
       Could we just refer to a single constant value 
(DEFAULT_MAX_RESPONSE_CONTENT_LENGTH)? 

##########
File path: 
rt/transports/http-netty/netty-client/src/main/java/org/apache/cxf/transport/http/netty/client/NettyHttpConduit.java
##########
@@ -651,5 +660,24 @@ public void postShutdown() {
     public void preShutdown() {
     }
 
+    protected static int determineMaxResponseContentLength(Message message) {
+        Integer maxResponseContentLength = null;
+        if (message.get(MAX_RESPONSE_CONTENT_LENGTH) != null) {
+            Object obj = message.get(MAX_RESPONSE_CONTENT_LENGTH);
+            try {
+                maxResponseContentLength = Integer.parseInt(obj.toString());
+            } catch (NumberFormatException e) {
+                LOG.log(Level.WARNING, "INVALID_TIMEOUT_FORMAT", new Object[] {
+                    MAX_RESPONSE_CONTENT_LENGTH, obj.toString()
+                });
+            }
+        }
+        if (maxResponseContentLength == null) {
+            maxResponseContentLength = 
SystemPropertyAction.getInteger(MAX_RESPONSE_CONTENT_LENGTH,
+                DEFAULT_MAX_RESPONSE_CONTENT_LENGTH);
+        }

Review comment:
       I don't think the system property is necessary, as 
determineConnection/ReceiveTimeout don't check it, only the message.




----------------------------------------------------------------
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]


Reply via email to