Skip to content

Commit

Permalink
Merge pull request payara#6569 from breakponchito/FISH-7212-avoid-cre…
Browse files Browse the repository at this point in the history
…ation-of-mime-temporal-files

FISH-7212: avoiding creation of temporal files on local system
  • Loading branch information
breakponchito authored and Pandrex247 committed Mar 11, 2024
1 parent c6ab176 commit 47c42ca
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* only if the new code is made subject to such option by the copyright
* holder.
*/
//Portions Copyright [2022] [Payara Foundation and/or its affiliates]
//Portions Copyright [2022-2024] [Payara Foundation and/or its affiliates]
package com.sun.enterprise.admin.remote.reader;

import com.sun.enterprise.admin.remote.ParamsWithPayload;
Expand Down Expand Up @@ -94,7 +94,9 @@ public ParamsWithPayload readFrom(final InputStream is, final String contentType
if (!StringUtils.ok(boundary)) {
throw new IOException("ContentType does not define boundary");
}
final MIMEMessage mimeMessage = new MIMEMessage(is, boundary, new MIMEConfig());
MIMEConfig mimeConfig = new MIMEConfig();
mimeConfig.setMemoryThreshold(-1L);
final MIMEMessage mimeMessage = new MIMEMessage(is, boundary, mimeConfig);
//Parse
for (MIMEPart mimePart : mimeMessage.getAttachments()) {
String cd = getFirst(mimePart.getHeader("Content-Disposition"));
Expand Down

0 comments on commit 47c42ca

Please sign in to comment.