natural commented on a change in pull request #4125: NIFI-7153 Adds 
ContentLengthFilter and DoSFilter
URL: https://github.com/apache/nifi/pull/4125#discussion_r396011326
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-jetty/src/main/java/org/apache/nifi/web/server/JettyServer.java
 ##########
 @@ -607,6 +612,25 @@ private WebAppContext loadWar(final File warFile, final 
String contextPath, fina
         return webappContext;
     }
 
+    private void addContentLengthFilter(String contextPath, String pathSpec, 
WebAppContext webappContext) {
+        final FilterHolder holder = new 
FilterHolder(ContentLengthFilter.class);
+        final Map<String, String> largePaths = 
props.getWebMaxContentSizeLargePaths();
+        int size;
+
+        if (!largePaths.containsValue(contextPath)) {
+            size = DataUnit.parseDataSize(props.getWebMaxContentSize(), 
DataUnit.B).intValue();
 
 Review comment:
   I've updated the method that uses the values to handle parsing exceptions 
and values out of range.

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


With regards,
Apache Git Services

Reply via email to