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



##########
File path: 
rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
##########
@@ -652,6 +652,25 @@ protected static int determineConnectionTimeout(Message 
message,
         return (int)ctimeout;
     }
 
+    protected static int determineMaxResponseContentLength(Message message,
+                                                 HTTPClientPolicy csPolicy) {
+        Integer maxResponseContentLength = 
csPolicy.getMaxResponseContentLength();
+        if (message.get(Message.MAX_RESPONSE_CONTENT_LENGTH) != null) {
+            Object obj = message.get(Message.MAX_RESPONSE_CONTENT_LENGTH);
+            try {
+                maxResponseContentLength = Integer.parseInt(obj.toString());
+            } catch (NumberFormatException e) {
+                LOG.log(Level.WARNING, "INVALID_TIMEOUT_FORMAT", new Object[] {
+                    Message.MAX_RESPONSE_CONTENT_LENGTH, obj.toString()
+                });
+            }
+        }
+        if (maxResponseContentLength == null) {
+            maxResponseContentLength = Integer.MAX_VALUE;

Review comment:
       change default to 1048576, extracted constant




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