Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-11126

ListenHTTP doesn't clean temporary files from multipart

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.19.1
    • 1.20.0
    • Extensions
    • None

    Description

      When a multipart/form-data POST is received by ListenHTTP and the content is greater than the Multipart Read Buffer Size property, the content is written to a file on disk in "java.io.tmpdir".  These files are never removed, even after the JVM is shutdown.

      To duplicate:

      • Configure a ListenHTTP processor with Multipart Read Buffer Size property with a small value such as 1 KB.
      • Configure an InvokeHTTP processor to POST files to ListenHTTP using multipart/form-data (the Request Multipart Form-Data Name property)
      • Configure a GenerateFlowFile processor to send a few files of size > 1 KB to InvokeHTTP

      Observe the java.io.tmpdir (typically /tmp on Linux) has files named MultiPart3098281529241123731, MultiPart8577800175462397766, etc

      Attachments

        Issue Links

          Activity

            People

              exceptionfactory David Handermann
              mosermw Michael W Moser
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 10m
                  1h 10m