You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "David Handermann (Jira)" <ji...@apache.org> on 2023/02/01 18:45:00 UTC

[jira] [Commented] (NIFI-11126) ListenHTTP doesn't clean temporary files from multipart

    [ https://issues.apache.org/jira/browse/NIFI-11126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683130#comment-17683130 ] 

David Handermann commented on NIFI-11126:
-----------------------------------------

Thanks for highlighting this issue and providing the background [~mosermw]. The {{ListenHTTPServlet}} method responsible for handling MultiPart elements never called {{{}Part.delete(){}}}, which leaves the temporary files described. I submitted a pull request to correct the behavior, and confirm that the temporary directory does not contain MultiPart files after processing.

> ListenHTTP doesn't clean temporary files from multipart
> -------------------------------------------------------
>
>                 Key: NIFI-11126
>                 URL: https://issues.apache.org/jira/browse/NIFI-11126
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>    Affects Versions: 1.19.1
>            Reporter: Michael W Moser
>            Assignee: David Handermann
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 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



--
This message was sent by Atlassian Jira
(v8.20.10#820010)