This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
     new 3bac62e  FELIX-6482 : Root directory used if location for multipart is 
set to empty string
3bac62e is described below

commit 3bac62e1ca40073650efc33e557832c0d47ea55a
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Thu Dec 9 13:23:12 2021 +0100

    FELIX-6482 : Root directory used if location for multipart is set to empty 
string
---
 .../org/apache/felix/http/base/internal/handler/ServletHandler.java    | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
 
b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
index 8d66351..9a3f2b3 100644
--- 
a/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
+++ 
b/http/base/src/main/java/org/apache/felix/http/base/internal/handler/ServletHandler.java
@@ -64,6 +64,9 @@ public abstract class ServletHandler implements 
Comparable<ServletHandler>
         if ( origConfig != null )
         {
             String location = origConfig.multipartLocation;
+            if ( location != null && location.trim().length() == 0 ) {
+                location = null;
+            }
             if ( location == null ) {
                 final Object obj = context == null ? null : 
context.getAttribute(JAVA_SERVLET_TEMP_DIR_PROP);
                 if ( obj != null ) {

Reply via email to