From 50af7bbda8f99c5fd21e8d27ae1412f71969c9b2 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Fri, 3 Jun 2022 10:55:02 +1000 Subject: [PATCH] fix multipart merge from 10.0.x Signed-off-by: Lachlan Roberts --- .../src/main/java/org/eclipse/jetty/server/Request.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java index 416f9a10cfb..7f62db911e8 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/Request.java @@ -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); } }