Bug ID: 64384
           Summary: <multipart-config> is ignored when there is no
                    <file-threshold-size> element specified
           Product: Tomcat 8
           Version: 8.5.51
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
  Target Milestone: ----

When a <multipart-config> element is present without any <file-size-threshold>
child element, the whole <multipart-config> appears to be ignored. Specifying
<file-size-threshold>0</file-size-threshold> (which is the default) results in
expected behavior.

With sample configuration:
      <max-file-size>1048576</max-file-size><!-- 1MiB -->
      <max-request-size>1049600</max-request-size><!-- 1 MiB + 1 kiB -->
      <file-size-threshold>1024</file-size-threshold><!-- 1KiB -->

File sizes larger than 1MiB are rejected as expected. Removing the
<file-size-threshold> element completely causes large files to be accepted as
if the configuration were not there.

Attaching a debugger, I can see that the multipartConfigElement is essentially
all defaults:

multipartConfigElement  MultipartConfigElement  (id=545)
        fileSizeThreshold       0
        location        "" (id=550)
        maxFileSize     -1
        maxRequestSize  -1

You are receiving this mail because:
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to