fix multipart merge from 10.0.x

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2022-06-03 10:55:02 +10:00
parent 3b563d2000
commit 50af7bbda8
1 changed files with 2 additions and 3 deletions

View File

@ -2359,17 +2359,16 @@ public class Request implements HttpServletRequest
if (LOG.isDebugEnabled())
LOG.debug("newMultiParts {} {}", compliance, this);
File tempdir = (File)_context.getAttribute("jakarta.servlet.context.tempdir");
switch (compliance)
{
case RFC7578:
return new MultiParts.MultiPartsHttpParser(getInputStream(), getContentType(), config,
(_context != null ? tempdir : null), this);
(_context != null ? (File)_context.getAttribute("javax.servlet.context.tempdir") : null), this);
case LEGACY:
default:
return new MultiParts.MultiPartsUtilParser(getInputStream(), getContentType(), config,
(_context != null ? tempdir : null), this);
(_context != null ? (File)_context.getAttribute("javax.servlet.context.tempdir") : null), this);
}
}