10 Replies Latest reply on Jun 21, 2017 3:20 PM by Clairton Rodrigo Heinzen

    Wildfly 9.0.2 increasing max-post-size

    Ganesh Saithala Newbie

      Hi,

      At present Wildfly is using integer range validator to validate max-post-size parameter.

      We have requirement to support uploading of file size greater than 2.4GB (this limitation is due to integer range validator).

      Changing the validator to LongRangeValidator is allowing us to upload files larger than 2.4GB.

      org.jboss.as.web.WebConnectorDefinition.java

      protected static final SimpleAttributeDefinition MAX_POST_SIZE =

                  new SimpleAttributeDefinitionBuilder(Constants.MAX_POST_SIZE, ModelType.LONG)

                          .setAllowNull(true)

                          .setValidator(new LongRangeValidator(0, Long.MAX_VALUE, true, true))

                          .setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)

                          .setDefaultValue(new ModelNode(2097152))

                          .setAllowExpression(true)

                          .build();

       

      Do you see any issues with the above approach or is there any other approach to achieve the same?

      Regards,

      Ganesh